Skip to main content

Module split

Module split 

Source
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 πŸ”’
SplitTrees
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 merged at 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_suffix rebuilds this subtree without reading merged.