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 2022/08/19 06:52:57 UTC

[GitHub] [spark] ConeyLiu commented on a diff in pull request #37565: [SPARK-40137][SQL] Combines limits after projection

ConeyLiu commented on code in PR #37565:
URL: https://github.com/apache/spark/pull/37565#discussion_r949857547


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala:
##########
@@ -1994,6 +1994,13 @@ object EliminateLimits extends Rule[LogicalPlan] {
       LocalLimit(Literal(Least(Seq(ne, le)).eval().asInstanceOf[Int]), grandChild)
     case Limit(le, Limit(ne, grandChild)) =>
       Limit(Literal(Least(Seq(ne, le)).eval().asInstanceOf[Int]), grandChild)
+
+    case Project(projectList, Limit(l, child)) =>

Review Comment:
   Thanks @wangyum for your time. What about:
   ```scala
   case Limit(l, Project(projectList, child)) =>
     Project(projectList, Limit(l, child))
   ```



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