Skip to main content

Module aggregate

Module aggregate 

Source
Expand description

Reductions over a sparse tile.

Five reducers (Sum / Count / Min / Max / Mean) operate on a single attribute column. The shape is partial-friendly: each tile produces an AggregateResult which the executor merges across tiles via AggregateResult::merge. Mean carries (sum, count) so merges are exact rather than averaging averages.

Group-by (group_by_dim) buckets cells by one dim’s values and returns a Vec<(CoordValue, AggregateResult)> ordered by first appearance. Sort/order is the caller’s job — keeping insertion order avoids forcing Ord on CoordValue.

Structs§

GroupAggregate
One bucket of a group-by aggregate. The key is the dim value the rows share; result is the reducer’s running partial over that bucket.

Enums§

AggregateResult
Partial result for one reducer over one (group of) cell(s). Mean retains (sum, count) so partials merge exactly.
Reducer

Functions§

aggregate_attr
Reduce one attr column over all rows of a tile. attr_idx must be in range; non-numeric / null cells are skipped (Count includes non-null cells regardless of dtype, since “count of cells with this attribute populated” is a sensible fold across all attr types).
group_by_dim
Group rows by one dim’s values and reduce attr_idx per group. Returns groups in first-seen order.