-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[tpcds](nereids) add rule to eliminate empty relation #22203
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
|
run buildall |
|
run buildall |
|
(From new machine)TeamCity pipeline, clickbench performance test result: |
|
run buildall |
|
run buildall |
|
(From new machine)TeamCity pipeline, clickbench performance test result: |
|
run buildall |
|
(From new machine)TeamCity pipeline, clickbench performance test result: |
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/EliminateEmptyRelation.java
Outdated
Show resolved
Hide resolved
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/EliminateEmptyRelation.java
Outdated
Show resolved
Hide resolved
|
run buildall |
|
run buildall |
|
(From new machine)TeamCity pipeline, clickbench performance test result: |
|
PR approved by anyone and no changes requested. |
|
PR approved by at least one committer and no changes requested. |
1. eliminate emptyrelation, 2. const fold after filter pushdown
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.
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.
Proposed changes
Issue Number: close #xxx
Further comments
If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...