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 2021/07/06 20:55:21 UTC

[GitHub] [spark] allisonwang-db commented on pull request #33100: [SPARK-35906][SQL] Remove order by if the maximum number of rows less than or equal to 1

allisonwang-db commented on pull request #33100:
URL: https://github.com/apache/spark/pull/33100#issuecomment-875074883


   Hi @wangyum It seems that the `maxRow` check should be added in `recursiveRemoveSort` instead of `applyLocally`. Current the Once strategy's idempotency can be broken if the plan has two consecutive sorts that are removable:
   ```scala
   Sort [a ASC]
   +- Sort [a ASC]
   ```
   
   Example query:
   ```sql
   select a from (select a from values(0, 1) t(a, b) order by a) order by a
   ```


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