AveryQi115 commented on code in PR #50285: URL: https://github.com/apache/spark/pull/50285#discussion_r2054616260
########## sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/FunctionTableSubqueryArgumentExpression.scala: ########## @@ -46,6 +46,10 @@ import org.apache.spark.sql.types.DataType * relation or as a more complex logical plan in the event of a table subquery. * @param outerAttrs outer references of this subquery plan, generally empty since these table * arguments do not allow correlated references currently + * @param outerScopeAttrs outer references of the subquery plan that cannot be resolved by the Review Comment: About the stack of the scope idea, we can do it. It is no harm but the optimizer does not need it. But I think it brings extra effort to maintain this stack information. Because after EliminateSubqueryAlias or InlineCTE, the sequence of scopes might change. We might need to update all subquery's outerScopeAttrs information if we want to use stack of scopes. -- 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org