Skip to main content

Module aggregate

Module aggregate 

Source
Expand description

Aggregate function trait with type-erased state adapter.

Aggregate functions accumulate a result across multiple rows (e.g. SUM, COUNT, AVG). Each GROUP BY group gets its own state.

§Type Erasure

The FunctionRegistry stores aggregates as Arc<dyn AggregateFunction<State = Box<dyn Any + Send>>>. Concrete implementations use AggregateAdapter to wrap their typed state.

Structs§

AggregateAdapter
Type-erased adapter that wraps a concrete AggregateFunction so the registry can store heterogeneous aggregates behind a single trait object.

Traits§

AggregateFunction
An aggregate SQL function (e.g. SUM, COUNT, AVG).