-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[improvement](nereids) Use a unified approach to deal with monotonic function in partition prune #42934
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. Since 2024-03-18, the Document has been moved to doris-website. |
|
run buildall |
|
run p0 |
...rc/main/java/org/apache/doris/nereids/rules/expression/rules/OneRangePartitionEvaluator.java
Show resolved
Hide resolved
e7055c9 to
355a721
Compare
|
run buildall |
|
run buildall |
| if (partitionSlotContainsNull.containsKey(funcChild)) { | ||
| forNullable = func.withConstantArgs(partitionSlotContainsNull.get(funcChild) | ||
| ? new Nullable(funcChild) : new NonNullable(funcChild)); | ||
| } else { | ||
| forNullable = func.withConstantArgs(new Nullable(funcChild)); | ||
| } |
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.
boolean isNullable = partitionSlotContainsNull.getOrDefault(funcChild, true);
Expression withNullable = func.withConstantArgs(
isNullable ? new Nullable(funcChild) : new NonNullable(funcChild)
);|
run buildall |
|
run buildall |
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
… in partition prune (#42934) This pr use a unified approach to deal with monotonic function in partition prune. When adding a monotonic function in partition prune, we don't need to add visitXXX in OneRangePartitionEvaluator, only need to implement the Monotonic interface.
What problem does this PR solve?
This pr use a unified approach to deal with monotonic function in partition prune. When adding a monotonic function in partition prune, we don't need to add visitXXX in OneRangePartitionEvaluator, only need to implement the Monotonic interface.
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)