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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
