-
Notifications
You must be signed in to change notification settings - Fork 187
ORCA: Support pushdown partial aggregate below join #1187
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
Merged
Merged
Conversation
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
Contributor
Contributor
Author
2e02282 to
21c03c6
Compare
my-ship-it
approved these changes
Aug 14, 2025
Contributor
my-ship-it
left a comment
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.
LGTM
gongxun0928
approved these changes
Aug 14, 2025
21c03c6 to
95dae30
Compare
Different with CXformUtils::PexprPushGbBelowJoin(will pushdown the one-stage agg) Push the partial agg only follow the three rules: 1. The keyset of group by in(contains all) the keyset of join 2. The output from join outer child contains the scalar from groupby - the scalar from groupby is not the groupby key, but it's the output of agg 3. The output of group by contains(all) the join scalar used from outer child Partial agg cannot be pushed through join because (1) no group by keysets in(contains all) join keysets, or (3) Gb uses columns from both join children, or (4) Gb hides columns required for the join scalar child Not like the CXformUtils::PexprPushGbBelowJoin, pushdown a partial agg **NO REQUIRED** the unique key in the key of join inner child. Also we should **NEVER** pushdown the multi-stage agg from `CXformSplitDQA`(the DISTINCT case).
95dae30 to
1c382e7
Compare
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.




Fixes #ISSUE_Number
What does this PR do?
Type of Change
Breaking Changes
Test Plan
make installcheckmake -C src/test installcheck-cbdb-parallelImpact
Performance:
User-facing changes:
Dependencies:
Checklist
Additional Context
CI Skip Instructions