MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / pre_visit_expr

Method pre_visit_expr

nodedb-sql/src/aggregate_walk.rs:80–92  ·  view source on GitHub ↗
(&mut self, expr: &Expr)

Source from the content-addressed store, hash-verified

78 type Break = ();
79
80 fn pre_visit_expr(&mut self, expr: &Expr) -> ControlFlow<()> {
81 if let Expr::Function(f) = expr
82 && self.functions.is_aggregate(&function_name(f))
83 // A function with an OVER clause is a window function, not an
84 // aggregate. Window functions are handled by the window planner
85 // and must not trigger the GROUP BY / aggregate plan path.
86 && f.over.is_none()
87 {
88 self.found = true;
89 return ControlFlow::Break(());
90 }
91 ControlFlow::Continue(())
92 }
93}
94
95// ── Extractor ───────────────────────────────────────────────────────

Callers

nothing calls this directly

Calls 4

is_aggregateMethod · 0.80
function_nameFunction · 0.70
pushMethod · 0.45

Tested by

no test coverage detected