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/08/29 15:30:48 UTC

[GitHub] [spark] jchen5 commented on a diff in pull request #42705: [SPARK-36191][SQL] Handle limit and order by in correlated scalar (lateral) subqueries

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


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/DecorrelateInnerQuery.scala:
##########
@@ -655,6 +655,41 @@ object DecorrelateInnerQuery extends PredicateHelper {
             val newProject = Project(newProjectList ++ referencesToAdd, newChild)
             (newProject, joinCond, outerReferenceMap)
 
+          case global @ GlobalLimit(limit, local @ LocalLimit(localLimit, input)) =>

Review Comment:
   Can we use `Limit` extractor here? That also checks that they match like you're doing below.



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