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

Method complete

src/compute-types/src/plan/join.rs:321–341  ·  view source on GitHub ↗

Extract a final `MapFilterProject` once all columns are available. If not all columns are available this method will likely panic. This method differs from `extract_closure` in that it forcibly completes the join, extracting projections and expressions that may not be extracted with `extract_closure` (for example, literals, permutations, and repetition of output columns). The resulting closure m

(self)

Source from the content-addressed store, hash-verified

319 /// The resulting closure may be the identity operator, which can be
320 /// checked with the `is_identity()` method.
321 fn complete(self) -> JoinClosure {
322 let Self {
323 column_map,
324 mut equivalences,
325 mut mfp,
326 } = self;
327
328 for equivalence in equivalences.iter_mut() {
329 for expr in equivalence.iter_mut() {
330 expr.permute_map(&column_map);
331 }
332 }
333 let column_map_len = column_map.len();
334 mfp.permute_fn(|c| column_map[&c], column_map_len);
335 mfp.optimize();
336
337 JoinClosure {
338 ready_equivalences: equivalences,
339 before: mfp.into_plan().unwrap().into_nontemporal().unwrap(),
340 }
341 }
342
343 /// A method on `self` that extracts an available closure.
344 ///

Callers 2

create_fromMethod · 0.45
create_fromMethod · 0.45

Calls 7

permute_mapMethod · 0.80
permute_fnMethod · 0.80
unwrapMethod · 0.80
into_nontemporalMethod · 0.80
into_planMethod · 0.80
lenMethod · 0.45
optimizeMethod · 0.45

Tested by

no test coverage detected