Expand description
Merge functions for distributed array query results.
Slice merges concatenate row sets from shards in arrival order and
apply the coordinator-side limit. The output preserves each shard’s
intra-shard order; cross-shard ordering reflects arrival, since the
wire response (ArrayShardSliceResp::rows_msgpack) is a flat opaque
Vec<Vec<u8>> with no per-row sort key. A globally Hilbert-ordered
merge would require carrying a parallel prefix column on the wire and
a k-way merge here — that is a wire-format change, not a merger
change, and lives outside this module.
Aggregate merges combine per-shard partial aggregates using reducer-specific arithmetic (SUM/COUNT/MIN/MAX — same Welford technique as the timeseries merger).
Structs§
- Array
AggPartial - Partial aggregate contributed by a single shard for one group-by bucket.
Functions§
- any_
truncated_ before_ horizon_ agg - Returns
trueif any shard reported thatsystem_as_offell below its oldest tile version, causing the shard to contribute zero partials. - any_
truncated_ before_ horizon_ slice - Returns
trueif any shard reported thatsystem_as_offell below its oldest tile version and it produced zero rows as a result. - merge_
slice_ rows - Merge row batches from multiple shards into one result set.
- reduce_
agg_ partials - Merge per-shard partial aggregates into one result per group-by key.