Expand description
Merge functions for distributed array query results.
Plain slice merges (merge_slice_rows) concatenate row sets from shards
in arrival order and apply the coordinator-side limit, preserving each
shard’s intra-shard order. Cross-shard ordering reflects arrival, since
a plain slice row carries 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.
Audit-log slice merges (merge_slice_rows_sorted) do carry a sort key:
each native-msgpack row holds a _ts_system column, so these are merged
globally by system-time ascending before the limit is applied.
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.
- merge_
slice_ rows_ sorted - Merge row batches from multiple shards for an audit-log (
AllVersions) fan-out. - reduce_
agg_ partials - Merge per-shard partial aggregates into one result per group-by key.