You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2023/01/19 13:00:25 UTC

[GitHub] [spark] HyukjinKwon commented on a diff in pull request #39653: [SPARK-42115][SQL][PYTHON] Push down limit through Python UDFs

HyukjinKwon commented on code in PR #39653:
URL: https://github.com/apache/spark/pull/39653#discussion_r1081229852


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala:
##########
@@ -1006,7 +1006,7 @@ object CollapseProject extends Rule[LogicalPlan] with AliasHelper {
         agg.copy(aggregateExpressions = buildCleanedProjectList(
           p.projectList, agg.aggregateExpressions))
       case Project(l1, g @ GlobalLimit(_, limit @ LocalLimit(_, p2 @ Project(l2, _))))
-        if isRenaming(l1, l2) =>
+        if isRenaming(l1, l2) && l1.forall(!_.exists(_.isInstanceOf[PythonUDF])) =>

Review Comment:
   ```suggestion
           if isRenaming(l1, l2) =>
   ```



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