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

Method post_order_vec

src/expr/src/relation.rs:2351–2360  ·  view source on GitHub ↗

Return a vector of references to the subtrees of this expression in post-visit order (the last element is `&self`).

(&self)

Source from the content-addressed store, hash-verified

2349 /// Return a vector of references to the subtrees of this expression
2350 /// in post-visit order (the last element is `&self`).
2351 pub fn post_order_vec(&self) -> Vec<&Self> {
2352 let mut stack = vec![self];
2353 let mut result = vec![];
2354 while let Some(expr) = stack.pop() {
2355 result.push(expr);
2356 stack.extend(expr.children());
2357 }
2358 result.reverse();
2359 result
2360 }
2361}
2362
2363impl VisitChildren<Self> for MirRelationExpr {

Callers 1

annotate_planFunction · 0.80

Calls 4

childrenMethod · 0.65
popMethod · 0.45
pushMethod · 0.45
extendMethod · 0.45

Tested by

no test coverage detected