Expand description
Where a native aggregate is split so two planes can run it.
A Complete aggregate folds every contribution to a group, which is only correct when one
execution reads all of them. A raw-series scan hands its partitions to separate executions, so the
aggregate is split instead: the per-series prefix of the tree runs below the aggregate in the
partitions that read series, that aggregate becomes a Partial one exporting the state each
partition folded, and everything above it runs over the merged series.
The split is structural. The innermost aggregate of the tree is replaced by an input node at its
own output - that is where state enters - and the nodes above it become the suffix. What cannot be
split correctly is refused with [DataFusionError::NotImplemented], which the planner reads as
βplan this query the existing wayβ.
StructsΒ§
- Split π
- Split
Trees - A split aggregate as the two trees that run it, and the state they exchange between them.
FunctionsΒ§
- admit_
prefix π - Checks that the per-series prefix is a tree one partition can evaluate on its own.
- check_
cut π - Refuses an aggregate whose state the split cannot carry, and one grouped by a value field.
- declined π
- enter_
suffix π - Puts
mergedat the cut and returns the suffix above it. - histogram_
group_ πis_ single - Whether every histogram-routing key of this aggregate is necessarily empty.
- prefix_
fields π - The field names of the raw series the prefix reads, in source order.
- split π
- Splits the innermost aggregate out of
node. - suffix_
carries π - Whether
enter_suffixrebuilds this subtree without readingmerged.