-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
[fix](nereids)AdjustNullable rule should handle union node with no children #35074
Conversation
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
run buildall |
689bc3b
to
d9a04c9
Compare
run buildall |
TPC-H: Total hot run time: 40353 ms
|
TPC-DS: Total hot run time: 181671 ms
|
ClickBench: Total hot run time: 30.64 s
|
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/AdjustNullable.java
Show resolved
Hide resolved
d9a04c9
to
3067d1f
Compare
run buildall |
PR approved by at least one committer and no changes requested. |
PR approved by anyone and no changes requested. |
TPC-H: Total hot run time: 40252 ms
|
TPC-DS: Total hot run time: 169070 ms
|
ClickBench: Total hot run time: 30.57 s
|
} | ||
if (setOperation instanceof LogicalUnion) { | ||
LogicalUnion logicalUnion = (LogicalUnion) setOperation; | ||
int consExprListSize = logicalUnion.getConstantExprsList().size(); | ||
if (consExprListSize > 0 && inputNullable == null) { |
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.
!logicalUnion.getConstantExprsList().isEmpty() && !setOperation.children().isEmpty()
} | ||
} | ||
} | ||
if (inputNullable == null) { |
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.
logicalUnion.getConstantExprsList().isEmpty() && setOperation.children().isEmpty()
=> inputNullable == null
3067d1f
to
6bf6420
Compare
run buildall |
TPC-H: Total hot run time: 39882 ms
|
TPC-DS: Total hot run time: 169486 ms
|
ClickBench: Total hot run time: 30.72 s
|
6bf6420
to
a788620
Compare
run buildall |
TPC-H: Total hot run time: 40581 ms
|
TPC-DS: Total hot run time: 169240 ms
|
ClickBench: Total hot run time: 30.38 s
|
run buildall |
PR approved by at least one committer and no changes requested. |
TPC-H: Total hot run time: 41160 ms
|
TPC-DS: Total hot run time: 169796 ms
|
ClickBench: Total hot run time: 29.98 s
|
…hildren (#35074) The output slot's nullable info is not correctly calculated in union node. Because old code only get correct result if union node has children. But the union node may have no children but only have constantExprList. So in that case, we should calculate output's nullable info byboth children and constantExprList.
…hildren (#35074) The output slot's nullable info is not correctly calculated in union node. Because old code only get correct result if union node has children. But the union node may have no children but only have constantExprList. So in that case, we should calculate output's nullable info byboth children and constantExprList.
…hildren (apache#35074) The output slot's nullable info is not correctly calculated in union node. Because old code only get correct result if union node has children. But the union node may have no children but only have constantExprList. So in that case, we should calculate output's nullable info byboth children and constantExprList.
Proposed changes
The output slot's nullable info is not correctly calculated in union node. Because old code only get correct result if union node has children. But the union node may have no children but only have constantExprList. So in that case, we should calculate output's nullable info by both children and constantExprList.
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...