-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-28375][SQL] Make pullupCorrelatedPredicate idempotent #25268
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
|
Test build #108239 has finished for PR 25268 at commit
|
|
WIP? |
| assert(optimized.resolved) | ||
| } | ||
|
|
||
| test("SPARK-28375 PullupCorrelatedPredicates in correlated subquery idiompotency check") { |
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.
For me, this is an improvement PR. We don't need use JIRA id.
|
@yeshengm The test results look ok. Can you please look at the changes and let me know what you think.. ? |
|
Test build #108260 has finished for PR 25268 at commit
|
|
@dilipbiswal I added an idempotence checker recently. Could you rebase your branch on the latest master and test it again? |
|
Test build #108288 has finished for PR 25268 at commit
|
| comparePlans(optimized, doubleOptimized) | ||
| } | ||
|
|
||
| test("PullupCorrelatedPredicates exists correlated subquery idiompotency check") { |
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.
nit: spell "idempotence"
| assert(optimized.resolved) | ||
| } | ||
|
|
||
| test("PullupCorrelatedPredicates in correlated subquery idiompotency check") { |
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.
same here
| } | ||
|
|
||
| private def rewriteSubQueries(plan: LogicalPlan, outerPlans: Seq[LogicalPlan]): LogicalPlan = { | ||
| def getJoinCondition(newCond: Seq[Expression], oldCond: Seq[Expression]): Seq[Expression] = { |
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.
Is it true that this function is to workaround cases where the newCond is empty, while outer references is not empty? Maybe we should add some comment here since it might be tricky to understand...
yeshengm
left a comment
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.
Overall LGTM, only some minor comments. Thanks! @dilipbiswal
|
Test build #108295 has finished for PR 25268 at commit
|
|
retest this please |
|
Test build #108308 has finished for PR 25268 at commit
|
|
retest this please |
|
Test build #108339 has finished for PR 25268 at commit
|
gatorsmile
left a comment
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.
LGTM
Thanks! Merged to master
|
Thanks a lot @yeshengm @gatorsmile |
|
Hi, All. |
What changes were proposed in this pull request?
This PR makes the optimizer rule PullupCorrelatedPredicates idempotent.
How was this patch tested?
A new test PullupCorrelatedPredicatesSuite