[VL] Option to insert partial-merge aggregations for eager aggregation - #13086
Draft
zhztheplayer wants to merge 1 commit into
Draft
zhztheplayer wants to merge 1 commit into
zhztheplayer wants to merge 1 commit into
Conversation
|
Run Gluten Clickhouse CI on x86 |
zhztheplayer
marked this pull request as draft
September 22, 2026 04:39
Contributor
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
It changes logical/physical aggregation semantics across joins (including new wrapper phases), so a final human review is recommended to validate correctness/performance across broader query patterns.
Review effort: Lite
Findings: None
What changed in this PR
This PR adds an optional “PartialMerge-after-each-push” mode to the join-aggregate pushdown optimization, allowing additional intermediate aggregation/merge steps when pushing wrapper aggregates across multi-join shapes (experimental eager aggregation path).
Changes:
- Added
spark.gluten.sql.pushAggregateThroughJoin.partialMerge.enabledto optionally insert a PartialMerge wrapper aggregate above each pushed join edge. - Extended join-aggregate wrapper semantics with a new
PartialMergePhaseand updated the physical planning strategy to lower it correctly. - Expanded/updated join-aggregate pushdown test coverage to validate plan shapes (aggregate node counts) with PartialMerge enabled vs disabled.
| File | Description |
|---|---|
| gluten-substrait/src/test/scala/org/apache/gluten/execution/PushAggregateThroughJoinSuite.scala | Extends test matrix to assert additional wrapper aggregates appear when partial-merge is enabled. |
| gluten-substrait/src/main/scala/org/apache/gluten/extension/joinagg/PushAggregateThroughJoin.scala | Adds config-gated insertion of a PartialMerge wrapper layer while continuing to push the lower Partial wrapper through joins. |
| gluten-substrait/src/main/scala/org/apache/gluten/extension/joinagg/JoinAggregateFunctionWrapper.scala | Introduces PartialMergePhase and updates semantic-mode mapping and wrapper semantics accordingly. |
| gluten-substrait/src/main/scala/org/apache/gluten/extension/joinagg/ImplementJoinAggregate.scala | Adds physical lowering support for PartialMergePhase and refactors planning into a shared phase implementation. |
| gluten-substrait/src/main/scala/org/apache/gluten/config/GlutenConfig.scala | Registers the new dynamic SQLConf option and exposes it via GlutenConfig. |
| docs/Configuration.md | Documents the new configuration key and default. |
| backends-velox/src/test/scala/org/apache/gluten/execution/StarSchemaJoinAggregateSuite.scala | Adds a dedicated suite variant with partial-merge enabled and sets an explicit default in the base suite. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
The patch adds a new option to enable more intermediate aggregations when eager aggregation (experimental) is enabled.
zhztheplayer
force-pushed
the
wip-eager-intermediate
branch
from
September 23, 2026 04:23
759dd01 to
974779e
Compare
|
Run Gluten Clickhouse CI on x86 |
This branch has not been deployed
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.
The patch adds a new option to enable more intermediate aggregations when eager aggregation (experimental) is enabled.