jchen5 commented on code in PR #39375:
URL: https://github.com/apache/spark/pull/39375#discussion_r1067355121
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/DecorrelateInnerQuery.scala:
##########
@@ -667,6 +720,24 @@ object DecorrelateInnerQuery extends PredicateHelper {
val newJoin = j.copy(left = newLeft, right = newRight, condition =
newCondition)
(newJoin, newJoinCond, newOuterReferenceMap)
+ case u: Union =>
+ // First collect outer references from all children
+ val collectedChildOuterReferences =
collectOuterReferencesInPlanTree(u)
Review Comment:
It's described with an example in the linked doc
https://docs.google.com/document/d/11b9ClCF2jYGU7vU2suOT7LRswYkg6tZ8_6xJbvxfh2I/edit#
- does that answer your question? I'll add the info to the comments as well.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]