-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[fix](rbo) use wrong child's output of set operation #59105
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
Conversation
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
|
run buildall |
TPC-H: Total hot run time: 35024 ms |
TPC-DS: Total hot run time: 178287 ms |
ClickBench: Total hot run time: 27.19 s |
240567e to
711fba5
Compare
|
run buildall |
TPC-H: Total hot run time: 36472 ms |
TPC-DS: Total hot run time: 175826 ms |
ClickBench: Total hot run time: 27.53 s |
FE UT Coverage ReportIncrement line coverage |
FE Regression Coverage ReportIncrement line coverage |
|
PR approved by anyone and no changes requested. |
|
PR approved by at least one committer and no changes requested. |
Related PR: #22203 Problem Summary: This pull request refines the logic in the `EliminateEmptyRelation` rewrite rule, focusing on how set operations (`UNION` and `EXCEPT`) handle empty relations in query plans. The changes improve efficiency and code clarity by processing only when necessary, optimizing builder usage, and simplifying project and aggregate node construction. **Set Operation Handling Improvements:** * Updated the logic for `UNION` nodes to only process and eliminate empty relation children when at least one is present, reducing unnecessary computation. Builders are now initialized with expected sizes for efficiency, and redundant code for handling constant expressions was removed. * Improved handling of `EXCEPT` nodes by checking for empty relations only among the right-hand children, and optimizing builder initialization. The construction of aggregate and project nodes now uses the correct outputs directly, streamlining the process.
What problem does this PR solve?
Related PR: #22203
Problem Summary:
This pull request refines the logic in the
EliminateEmptyRelationrewrite rule, focusing on how set operations (UNIONandEXCEPT) handle empty relations in query plans. The changes improve efficiency and code clarity by processing only when necessary, optimizing builder usage, and simplifying project and aggregate node construction.Set Operation Handling Improvements:
UNIONnodes to only process and eliminate empty relation children when at least one is present, reducing unnecessary computation. Builders are now initialized with expected sizes for efficiency, and redundant code for handling constant expressions was removed.EXCEPTnodes by checking for empty relations only among the right-hand children, and optimizing builder initialization. The construction of aggregate and project nodes now uses the correct outputs directly, streamlining the process.Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)