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

Method analyse

src/transform/src/analysis.rs:397–415  ·  view source on GitHub ↗
(&mut self, exprs: &[&MirRelationExpr], depends: &Derived)

Source from the content-addressed store, hash-verified

395
396 impl<A: Analysis> AnalysisBundle for Bundle<A> {
397 fn analyse(&mut self, exprs: &[&MirRelationExpr], depends: &Derived) -> bool {
398 self.results.clear();
399 // Attempt optimistic analysis, and if that fails go pessimistic.
400 let update = A::lattice()
401 .filter(|_| self.allow_optimistic)
402 .and_then(|lattice| {
403 for _ in exprs.iter() {
404 self.results.push(lattice.top());
405 }
406 self.analyse_optimistic(exprs, 0, exprs.len(), depends, &*lattice)
407 .ok()
408 })
409 .unwrap_or_else(|| {
410 self.results.clear();
411 self.analyse_pessimistic(exprs, depends)
412 });
413 assert_eq!(self.results.len(), exprs.len());
414 update
415 }
416 fn as_any(&self) -> &dyn std::any::Any {
417 self
418 }

Callers 1

visitMethod · 0.80

Calls 9

analyse_optimisticMethod · 0.80
analyse_pessimisticMethod · 0.80
clearMethod · 0.45
filterMethod · 0.45
iterMethod · 0.45
pushMethod · 0.45
topMethod · 0.45
okMethod · 0.45
lenMethod · 0.45

Tested by

no test coverage detected