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

Function convert_group_by

nodedb-sql/src/planner/aggregate.rs:259–264  ·  view source on GitHub ↗

Convert GROUP BY clause to SqlExpr list.

(group_by: &GroupByExpr)

Source from the content-addressed store, hash-verified

257
258/// Convert GROUP BY clause to SqlExpr list.
259pub fn convert_group_by(group_by: &GroupByExpr) -> Result<Vec<SqlExpr>> {
260 match group_by {
261 GroupByExpr::All(_) => Ok(Vec::new()),
262 GroupByExpr::Expressions(exprs, _) => exprs.iter().map(convert_expr).collect(),
263 }
264}
265
266/// Scan the SELECT projection for `GROUPING(col)` calls and return synthetic
267/// `AggregateExpr` entries so the executor can compute the per-set bitmask value.

Callers 2

plan_aggregateFunction · 0.85
plan_join_from_selectFunction · 0.85

Calls 2

collectMethod · 0.80
iterMethod · 0.45

Tested by

no test coverage detected