allisonwang-db commented on a change in pull request #32303:
URL: https://github.com/apache/spark/pull/32303#discussion_r622372553



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CheckAnalysis.scala
##########
@@ -1037,6 +1057,10 @@ trait CheckAnalysis extends PredicateHelper with 
LookupCatalog {
             failOnInvalidOuterReference(j)
             failOnOuterReferenceInSubTree(left)
 
+          // Lateral join is not supported inside a correlated subquery.
+          case LateralJoin(_) =>
+            failOnOuterReferenceInSubTree(j)

Review comment:
       The error message here is "Accessing outer query column is not allowed 
in LateralJoin...". I will make the error message more explicit.




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

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

Reply via email to