Skip to content

refactor(hash-aggr): Migrate single mode hash aggregation#23408

Open
2010YOUY01 wants to merge 2 commits into
apache:mainfrom
2010YOUY01:split-aggr-single
Open

refactor(hash-aggr): Migrate single mode hash aggregation#23408
2010YOUY01 wants to merge 2 commits into
apache:mainfrom
2010YOUY01:split-aggr-single

Conversation

@2010YOUY01

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Part of #22710

Rationale for this change

This PRs implements the single aggregation (fused partial and final aggregation into a single physical plan operator). This mode can be planed if input is already hash/range partitioned.

See comments at datafusion/physical-plan/src/aggregates/single_stream.rs for details.

What changes are included in this PR?

  • Adds an AggregateHashTable<SingleMarker> variant to handle single aggregation.
  • Adds SingleHashAggregateStream that uses AggregateHashTable<SingleMarker> to implement the single aggregation state machine.

Are these changes tested?

Existing tests for functionalities + UT for planning

Are there any user-facing changes?

No

@github-actions github-actions Bot added the physical-plan Changes to the physical-plan crate label Jul 9, 2026
@2010YOUY01 2010YOUY01 requested a review from alamb July 9, 2026 07:01

@alamb alamb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hope to review this tomorrow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

physical-plan Changes to the physical-plan crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants