-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[fix](nereids) fix AND extract uniform slots #50265
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 |
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
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.
Pull Request Overview
This PR fixes the uniform slot extraction functionality by updating the extraction algorithm for And expressions and adds corresponding unit tests. The key changes include:
- Updating the ExpressionUtils.extractUniformSlot method to iterate over all children of an And expression.
- Introducing a new unit test in ExpressionUtilsTest to verify the behavior of uniform slot extraction.
- Refactoring the code for clarity and improved consistency in handling And expressions.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| fe/fe-core/src/test/java/org/apache/doris/nereids/util/ExpressionUtilsTest.java | Added a test (testExtractUniformSlot) to verify that uniform slots are correctly extracted from complex And expressions. |
| fe/fe-core/src/main/java/org/apache/doris/nereids/util/ExpressionUtils.java | Updated the uniform slot extraction, replacing hard-coded child references with iteration over all children of an And expression. |
Comments suppressed due to low confidence (1)
fe/fe-core/src/test/java/org/apache/doris/nereids/util/ExpressionUtilsTest.java:197
- Consider adding additional test cases to cover scenarios where the EqualTo expression does not satisfy the conditions for uniform slot extraction (e.g., when the first child is not injective or when the second child is non-constant).
@Test public void testExtractUniformSlot() {
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
|
run buildall |
TPC-H: Total hot run time: 33943 ms |
|
PR approved by at least one committer and no changes requested. |
TPC-DS: Total hot run time: 191733 ms |
ClickBench: Total hot run time: 29.31 s |
|
run p0 |
1 similar comment
|
run p0 |
|
run feut |
5 similar comments
|
run feut |
|
run feut |
|
run feut |
|
run feut |
|
run feut |
891ec92 to
c324575
Compare
|
run buildall |
TPC-H: Total hot run time: 34155 ms |
TPC-DS: Total hot run time: 192539 ms |
ClickBench: Total hot run time: 29.96 s |
|
run buildall |
TPC-H: Total hot run time: 34619 ms |
TPC-DS: Total hot run time: 191935 ms |
|
run feut |
ClickBench: Total hot run time: 29.16 s |
|
run feut |
|
run cloud_p0 |
|
run buildall |
TPC-H: Total hot run time: 34224 ms |
TPC-DS: Total hot run time: 185734 ms |
ClickBench: Total hot run time: 29.56 s |
|
run p0 |
### What problem does this PR solve? apache#44574 make AND's child size may exceeds 2, need consider.
What problem does this PR solve?
#44574 make AND's child size may exceeds 2, need consider.
Issue Number: close #xxx
Related PR: #44574
Problem Summary:
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)