cloud-fan commented on code in PR #50822:
URL: https://github.com/apache/spark/pull/50822#discussion_r2078773353


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/subquery.scala:
##########
@@ -75,18 +76,35 @@ abstract class PlanExpression[T <: QueryPlan[_]] extends 
Expression {
  */
 abstract class SubqueryExpression(
     plan: LogicalPlan,
-    outerAttrs: Seq[Expression],
+    outerAttrs: Seq[(Expression, Boolean)],

Review Comment:
   Let's say the plan is
   ```
   OuterPlan1
     OuterPlan2
       SubqueryExpression(attr1, attr2)
   ```
   
   If `attr1` is from `OuterPlan1`, then it should be `OuterReference`. If 
`attr2` is from `OuterPlan2`, it should be `AttributeReference`. The rationale 
is: `SubqueryExpression` lives in the `OuterPlan2`, so it can directly use 
`AttributeReference` to reference columns (but not in 
`SubqueryExpression#plan`).
   
   Seems we don't need the boolean flag?



-- 
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]

Reply via email to