agubichev commented on code in PR #43111:
URL: https://github.com/apache/spark/pull/43111#discussion_r1345923815


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

Review Comment:
   no, we don't.
   In fact, CheckAnalysis now allows LIMIT in the correlated subqueries as we 
support them in lateral/scalar/ EXISTs and IN (the latter is done in this PR).
   
   This check just makes sure that the legacy path (aka 
PullupCorrelatedPredicates) does not allow LIMITs.



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