Expand description
Auto-extracted from physical_operator.rs
Structs§
- Aggregate
Hash Table - A parallel hash table for aggregation with GROUP BY keys.
Functions§
- build_
group_ key - Build a composite group key from chunk columns.
- hash_
group_ key - Hash group key columns directly from Arrow arrays without creating intermediate
Valueobjects. For strings, avoids theto_string()allocation thatget_value()would incur. For primitives, avoidsValueenum dispatch overhead. - keys_
equal - Check if a stored group key matches the current row’s group column values. Avoids creating Value::List or intermediate Value objects for comparison.
- resolve_
agg_ col_ indices - Resolve aggregate function argument expressions to column indices. Returns one Option per function: None means no column needed (e.g., COUNT(*)).
- resolve_
group_ by_ indices - Resolve GROUP BY expressions to actual column indices using field_names.
- update_
states_ row - Update aggregate states for a single row.
- update_
states_ row_ distinct - Update aggregate states for a single row, honoring per-function DISTINCT
flags (P88,
COUNT(DISTINCT x)→ nameCOUNT_DISTINCT+ this flag). For DISTINCT functions, NULLs and argument values already seen for this (group, function) are skipped, so the state only ever accumulates distinct non-null values. Seen-values use a linearVec<Value>scan — fine for the rarity of DISTINCT aggregates; dedicated fast paths cover the common cases.