Repository navigation
[core] Read single-run sections of aggregation tables without sort merge - #1370
Merged
Merged
Conversation
This was referenced Nov 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Linked issue: none, follows #1164
#1164 reads a single-run section without the sort merge for deduplicate and first-row. Aggregation can take the same path: when a key has one version, the merge function already returns that row as is (
singleton_reducer_result) and omits a lone retract, which is what the unmerged path does per batch. The exception ischangelog-producer = lookup, where aggregation reduces singletons too, so it keeps merging.Brief change log
changelog-producer = lookup.reduces_singletons(options)holds that rule, and the three merge functions that had it inline use it.PK table, 2M keys in 4 files with disjoint keys,
sumon one column, full read (release, in-memory FileIO): 187–194 → 89–90 ms, the same as deduplicate. Measured in one binary with the merge path switched back by an env var, 3 alternating rounds. With overlapping rounds (the merge still runs) and for deduplicate, times are unchanged.Tests
aggregation_reads_disjoint_files_without_merge_and_overlaps_still_merge: disjoint files read as written, an overlapping file still sums.single_run_read_merges_repeated_keys_under_aggregation: a pre-fix(core): align evolution stats and aggregation flush with Java #839 file that repeats a key still sums.single_run_read_drops_retracts_hidden_by_legacy_metadatagets an aggregation case.The new tests also pass on main, so the output matches the merge path. Ran the ci.yml steps locally (fmt, clippy, msrv, unit, rest-server, integration, datafusion, python, go).
API and Format
None.
Documentation
None.