cloud-fan commented on a change in pull request #23057: [SPARK-26078][SQL]
Dedup self-join attributes on IN subqueries
URL: https://github.com/apache/spark/pull/23057#discussion_r240606988
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/subquery.scala
##########
@@ -92,18 +114,20 @@ object RewritePredicateSubquery extends Rule[LogicalPlan]
with PredicateHelper {
// Deduplicate conflicting attributes if any.
dedupJoin(Join(outerPlan, sub, LeftAnti, joinCond))
Review comment:
`dedupJoin` will evetually dedup the subquery IIUC.
What I'd like to do is to unify `dedupJoin` and `dedupSubqueryOnSelfJoin`,
so that the code will be consistent for all cases:
```
val newSub = dedup(sub, values)
// create join condition if any
Join(outerPlan, newSub, ...)
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]