Fix the partial aggregation pushdown for system table for native execution#25041
Merged
kewang1024 merged 1 commit intoprestodb:masterfrom May 14, 2025
Merged
Conversation
da43a90 to
476d585
Compare
6b04c43 to
4bf7d53
Compare
88f2650 to
be0a473
Compare
arhimondr
previously approved these changes
May 12, 2025
...ecution/src/test/java/com/facebook/presto/nativeworker/AbstractTestNativeGeneralQueries.java
Outdated
Show resolved
Hide resolved
5f95b9e to
981c377
Compare
981c377 to
5cd05b0
Compare
arhimondr
approved these changes
May 14, 2025
amitkdutta
approved these changes
May 14, 2025
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.
Follow up on #21725
containsSystemTableScanwill limit all the partial aggregation generation and pushdownwhenever we have a system table for native execution as leaf node.
When we have an aggregation on mix of empty grouping set and non-empty grouping set,
It would be forced to split into a partial aggregation and final aggregation on repartitioned
exchange. The partial aggregation could have been pushed down under the repartitioned
exchange but is not pushed down, due to the above constraint, leading to an invalid plan.
Fix the behavior by more precise check
directlyOnSystemTableScanfor partial aggregatiopushdown.