Skip to main content

execute_partial_aggregate

Function execute_partial_aggregate 

Source
pub fn execute_partial_aggregate(
    rows: Vec<HashMap<String, Value>>,
    group_by: &[String],
    aggregates: &[AggregateSpec],
    filters: &[u8],
) -> Result<QueryResult, LiteError>
Expand description

Execute a PartialAggregate.

On single-node Lite, data is already local so this produces the same final result as Aggregate (no HAVING/sort/grouping_sets) and encodes it in the partial-state format Origin expects: each output row is [group_key_col_0, ..., group_key_col_N, count_i64, sum_f64, min, max, ...] in the same column order as make_columns, with a leading __partial boolean column set to true so the Control-Plane merger can distinguish partial from final results.