-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[fix](nereids)check if correlated filter exists before converting apply to join #47985
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: 31799 ms |
TPC-DS: Total hot run time: 182093 ms |
ClickBench: Total hot run time: 30.4 s |
| public Rule build() { | ||
| return logicalApply().when(LogicalApply::isScalar).then(apply -> { | ||
| if (apply.isCorrelated()) { | ||
| if (apply.isCorrelated() && apply.getCorrelationFilter().isPresent()) { |
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.
maybe when apply.getCorrelationFilter().isPresent() == false, apply.isCorrelated() should return false?
e5f158a to
3460d5f
Compare
|
run buildall |
TPC-H: Total hot run time: 31784 ms |
TPC-DS: Total hot run time: 189460 ms |
ClickBench: Total hot run time: 30.54 s |
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
…ly to join (#47985) example sql: `SELECT * FROM t1 WHERE t1.x IN (SELECT x FROM t2 WHERE t1.y is NULL AND t1.y is NOT NULL);` the correlated filter `t1.y is NULL AND t1.y is NOT NULL` will be replaced as `FALSE` by SimplifyConflictCompound rule. So we need check if correlated filter exists before converting apply to join Related PR: (#47385)
…ly to join (#47985) example sql: `SELECT * FROM t1 WHERE t1.x IN (SELECT x FROM t2 WHERE t1.y is NULL AND t1.y is NOT NULL);` the correlated filter `t1.y is NULL AND t1.y is NOT NULL` will be replaced as `FALSE` by SimplifyConflictCompound rule. So we need check if correlated filter exists before converting apply to join Related PR: (#47385)
…ly to join (apache#47985) example sql: `SELECT * FROM t1 WHERE t1.x IN (SELECT x FROM t2 WHERE t1.y is NULL AND t1.y is NOT NULL);` the correlated filter `t1.y is NULL AND t1.y is NOT NULL` will be replaced as `FALSE` by SimplifyConflictCompound rule. So we need check if correlated filter exists before converting apply to join Related PR: (apache#47385)
…ly to join (apache#47985) example sql: `SELECT * FROM t1 WHERE t1.x IN (SELECT x FROM t2 WHERE t1.y is NULL AND t1.y is NOT NULL);` the correlated filter `t1.y is NULL AND t1.y is NOT NULL` will be replaced as `FALSE` by SimplifyConflictCompound rule. So we need check if correlated filter exists before converting apply to join Related PR: (apache#47385)
example sql:
SELECT * FROM t1 WHERE t1.x IN (SELECT x FROM t2 WHERE t1.y is NULL AND t1.y is NOT NULL);the correlated filter
t1.y is NULL AND t1.y is NOT NULLwill be replaced asFALSEby SimplifyConflictCompound rule. So we need check if correlated filter exists before converting apply to joinIssue Number: close #xxx
Related PR: (#47385)
Problem Summary:
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)