WangGuangxin commented on a change in pull request #26011: [SPARK-29343][SQL]
Eliminate sorts without limit in the subquery of Join/Aggregation
URL: https://github.com/apache/spark/pull/26011#discussion_r338413188
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala
##########
@@ -967,12 +967,18 @@ object EliminateSorts extends Rule[LogicalPlan] {
* Removes redundant Sort operation. This can happen:
* 1) if the child is already sorted
* 2) if there is another Sort operator separated by 0...n Project/Filter
operators
+ * 3) if the Sort operator is within Join and without Limit
+ * 4) if the Sort operator is within GroupBy and the aggregate function is
order irrelevant
*/
object RemoveRedundantSorts extends Rule[LogicalPlan] {
Review comment:
There is another rule named `EliminateSorts`. Can we merge it together?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]