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/18 06:04:35 UTC

[GitHub] [spark] wangyum commented on a diff in pull request #37519: [SPARK-40050][SQL] Eliminate the `Sort` if there is a `LocalLimit` between `Join`/`Aggregate` and `Sort`

wangyum commented on code in PR #37519:
URL: https://github.com/apache/spark/pull/37519#discussion_r948686448


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala:
##########
@@ -1540,7 +1540,8 @@ object EliminateSorts extends Rule[LogicalPlan] {
    */
   private def recursiveRemoveSort(
       plan: LogicalPlan,
-      canRemoveGlobalSort: Boolean): LogicalPlan = {
+      canRemoveGlobalSort: Boolean,
+      canEliminateThroughLocalLimit: Boolean = false): LogicalPlan = {

Review Comment:
   https://github.com/apache/spark/blob/2b1637fde5f6c2203d798e253a475d56a1340257/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala#L1529
   and
   https://github.com/apache/spark/blob/2b1637fde5f6c2203d798e253a475d56a1340257/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala#L1549-L1550



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