Mergeable Aggregates and Sufficient Summaries
Choose a summary that can be combined across partitions and recover the final statistic only after merging.
- Source
- Anbloq
- Language
- English
- Created
- Updated
- Chapters
- 2
- Reading time
- 1 min
In this article2 chapters
A partial statistic can omit a necessary weight
Two partitions with averages \(2\) and \(10\) do not necessarily have combined average six. If the first contains nine observations and the second one, the combined average is \((9\cdot2+10)/10=2.8\). Retain \((\mathrm{sum},\mathrm{count})\) and add the two fields independently on merge. Divide only when extracting a result, with a specified empty case.
Associativity permits regrouping
When a summary operation is associative, a change in the reduction tree preserves the intended mathematical result. Commutativity additionally permits reordering partial results. Floating-point approximations can still change low bits with different grouping. An arbitrary exact median cannot be recovered from just the median and size of each partition. Streaming variance uses richer summaries. Parallel reductions explain how the aggregation tree changes cost and reproducibility.[1][2]