-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-36665][SQL][FOLLOWUP] Avoid Optimizing Not(InSubquery) #35400
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
[SPARK-36665][SQL][FOLLOWUP] Avoid Optimizing Not(InSubquery) #35400
Conversation
|
@aokolnychyi Thank you for finding the issue. cc @viirya |
|
cc @cloud-fan |
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/optimizer/NotPropagationSuite.scala
Outdated
Show resolved
Hide resolved
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.
Could you also add an end-to-end test? We can make sure if the query result is correct.
|
cc @allisonwang-db FYI |
|
Are there any real-world examples to demonstrate the effectiveness of the rule |
|
Thanks @cloud-fan My goal here is to unblock #35395. As you mentioned your concern about the complexity of this logic, I opened #35428 to remove For the effectiveness, I put many examples at spark/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/optimizer/NotPropagationSuite.scala Lines 65 to 168 in 977dd05
|
|
Closing by preferring #35428 |
What changes were proposed in this pull request?
This is a follow-up PR to fix the bug introduced by SPARK-36665. With this fix,
NotPropagationoptimization does not apply toInSubquerycases.Why are the changes needed?
NotPropagationoptimization previously brokeRewritePredicateSubqueryso that it does not properly rewrite the predicate to a NULL-aware left anti join anymore.Does this PR introduce any user-facing change?
No
How was this patch tested?
Unit test added