MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / do_expirations

Method do_expirations

src/expr/src/relation.rs:2156–2170  ·  view source on GitHub ↗

Call this function when `id` is redefined. It modifies `id_infos` by removing information about such Ids whose information depended on the earlier definition of `id`, according to `expire_whens`. Also modifies `expire_whens`: it removes the currently processed entry.

(
        redefined_id: LocalId,
        expire_whens: &mut BTreeMap<LocalId, Vec<LocalId>>,
        id_infos: &mut BTreeMap<LocalId, I>,
    )

Source from the content-addressed store, hash-verified

2154 /// about such Ids whose information depended on the earlier definition of `id`, according to
2155 /// `expire_whens`. Also modifies `expire_whens`: it removes the currently processed entry.
2156 pub fn do_expirations<I>(
2157 redefined_id: LocalId,
2158 expire_whens: &mut BTreeMap<LocalId, Vec<LocalId>>,
2159 id_infos: &mut BTreeMap<LocalId, I>,
2160 ) -> Vec<(LocalId, I)> {
2161 let mut expired_infos = Vec::new();
2162 if let Some(expirations) = expire_whens.remove(&redefined_id) {
2163 for expired_id in expirations.into_iter() {
2164 if let Some(offer) = id_infos.remove(&expired_id) {
2165 expired_infos.push((expired_id, offer));
2166 }
2167 }
2168 }
2169 expired_infos
2170 }
2171}
2172/// Augment non-nullability of columns, by observing either
2173/// 1. Predicates that explicitly test for null values, and

Callers

nothing calls this directly

Calls 3

removeMethod · 0.45
into_iterMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected