AveryQi115 commented on code in PR #53664:
URL: https://github.com/apache/spark/pull/53664#discussion_r2796505253


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/InlineCTE.scala:
##########
@@ -60,9 +60,20 @@ case class InlineCTE(
     // because:
     // 1) It is fine to inline a CTE if it references another CTE that is 
non-deterministic;
     // 2) Any `CTERelationRef` that contains `OuterReference` would have been 
inlined first.
+
+    def hasOuterReference(plan: LogicalPlan): Boolean = {

Review Comment:
   We might want to update CheckAnalysis and ValidateSubqueryExpression to 
respect outer references within inlineTable.rows 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]

Reply via email to