Skip to main content

Module aggregate

Module aggregate 

Source
Expand description

GROUP BY and aggregate planning.

Functionsยง

convert_group_by
Convert GROUP BY clause to SqlExpr list.
extract_aggregates_from_projection
Extract aggregate expressions from SELECT projection.
group_by_output_aliases
Derive the SELECT-list output alias for each GROUP BY key by correlating each key with the projection item that references the same column. Returns a Vec parallel to group_by: Some(alias) when a projection item explicitly aliases that grouped column (SELECT k AS label ... GROUP BY k), otherwise None (the output column name falls back to the raw grouped column name).
plan_aggregate
Plan an aggregate query (GROUP BY + aggregate functions).