-
Notifications
You must be signed in to change notification settings - Fork 3.9k
[opt](pipeline) Add passthrough between repeat and streaming aggregation #66339
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Mryange
wants to merge
2
commits into
apache:master
Choose a base branch
from
Mryange:repeat-streaming-agg-passthrough
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This special case unconditionally inserts a local exchange and bypasses the opt-out semantics of
enable_local_exchange_before_streaming_agg.That dedicated switch was added with a default of
falsespecifically so StreamingAgg preserves its inherited distribution unless local exchange is explicitly enabled. In the BE path, the new Repeat check likewise runs beforeenable_local_exchange_before_streaming_agg()is checked. In the FE path, this branch also precedes the existingenableLeBeforeAggfallback and does not consult the streaming-specific switch at all.A two-phase grouping-sets query therefore gets
StreamingAgg <- LE(PASSTHROUGH) <- Repeateven when the streaming-agg switch is false. This should not change query results because this is partial aggregation followed by a final merge, but it makes the extra pipeline boundary, queues, and memory overhead impossible to disable, and silently changes the default behavior established by #66222.Please gate the Repeat PASSTHROUGH optimization with
enableLocalExchangeBeforeStreamingAgghere and withenable_local_exchange_before_streaming_agg()in BE, and add FE-/BE-planned tests for both switch values. If Repeat is intentionally meant to ignore the existing switch, that needs an explicit separately named switch and documented default behavior rather than bypassing the current opt-out.