ilicmarkodb commented on code in PR #53735:
URL: https://github.com/apache/spark/pull/53735#discussion_r2673258804
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/QueryExecution.scala:
##########
@@ -86,7 +86,10 @@ class QueryExecution(
lazy val isLazyAnalysis: Boolean = {
// Only check the main query as subquery expression can be resolved now
with the main query.
-
logical.exists(_.expressions.exists(_.exists(_.isInstanceOf[LazyExpression])))
+ // Also defer analysis for `UnresolvedTableValuedFunction` as it may
contain outer references
+ // that can only be resolved when used in a lateral join context.
+
logical.exists(_.expressions.exists(_.exists(_.isInstanceOf[LazyExpression])))
||
+ logical.exists(_.isInstanceOf[UnresolvedTableValuedFunction])
Review Comment:
Should we add a trait similar to `LazyExpression`, but not for expressions?
--
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]