You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "jchen5 (via GitHub)" <gi...@apache.org> on 2023/09/28 18:39:45 UTC

[GitHub] [spark] jchen5 commented on a diff in pull request #43061: [SQL] Throw an error for correlated exists/IN subqueries with LIMIT clauses

jchen5 commented on code in PR #43061:
URL: https://github.com/apache/spark/pull/43061#discussion_r1340540794


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/subquery.scala:
##########
@@ -283,6 +284,14 @@ object PullupCorrelatedPredicates extends Rule[LogicalPlan] with PredicateHelper
         } else {
           a
         }
+      case l @ Limit(_, _) if predicateMap.nonEmpty =>

Review Comment:
   IIRC in CheckAnalysis we don't easily know whether it's inside IN/EXISTS (unsupported) or scalar/lateral (supported).



-- 
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-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org