refactor(hash-aggr): migrate ordered single aggregation - #24259
Open
2010YOUY01 wants to merge 1 commit into
Open
refactor(hash-aggr): migrate ordered single aggregation#242592010YOUY01 wants to merge 1 commit into
2010YOUY01 wants to merge 1 commit into
Conversation
This was referenced Aug 11, 2026
2010YOUY01
commented
Aug 11, 2026
| } | ||
|
|
||
| /// Merges every sorted run and finalizes it through the fully ordered path. | ||
| fn into_replay_stream( |
Contributor
Author
There was a problem hiding this comment.
This step is mostly similar to the spilling paths of other aggregation modes. We should extract the common logic later.
2010YOUY01
commented
Aug 11, 2026
| &mut self, | ||
| evaluated_batch: &EvaluatedAggregateBatch, | ||
| is_final: bool, | ||
| aggregate_fn: AggregateBatchFn, |
Contributor
Author
There was a problem hiding this comment.
here is the key change for this file, just a clean-up to make it easier to be reused by different aggregation modes.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #24259 +/- ##
==========================================
- Coverage 81.06% 81.00% -0.06%
==========================================
Files 1107 1108 +1
Lines 382191 384599 +2408
Branches 382191 384599 +2408
==========================================
+ Hits 309805 311533 +1728
- Misses 54083 54709 +626
- Partials 18303 18357 +54 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Which issue does this PR close?
part of #22710
Rationale for this change
Migrate ordered single aggregation path.
For the background of the refactor, see EPIC issue for details
For the overview of the refactored path, see comments at the top of
datafusion/physical-plan/src/aggregates/ordered_single_stream.rsWhat changes are included in this PR?
datafusion/physical-plan/src/aggregates/mod.rs: physical planning changes that route the applicable execution to the 'ordered-single-aggregate` pathdatafusion/physical-plan/src/aggregates/ordered_single_stream.rs: main implementation. Overview is at the comments forOrderedSingleAggregateStream, and the entry point for execution state machine is atpoll_next()Are these changes tested?
Existing tests. I have verified the test line coverage from
llvm-covAre there any user-facing changes?
No