ulysses-you commented on code in PR #47545:
URL: https://github.com/apache/spark/pull/47545#discussion_r1704830398


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala:
##########
@@ -246,8 +246,6 @@ abstract class Optimizer(catalogManager: CatalogManager)
       CollapseProject,
       RemoveRedundantAliases,
       RemoveNoopOperators) :+
-    Batch("InsertMapSortInGroupingExpressions", Once,

Review Comment:
   It requires more rules to run `PullOutGroupingExpressions` again, e.g., we 
need to re prune and collapse project since we generate a new pre project. I 
changed to use such batch and add some tests for it.
   ```
   Batch("AddMapSortInAggregate", FixedPoint(1),
     AddMapSortInAggregate,
     PullOutGroupingExpressions,
     ColumnPruning,
     CollapseProject)
   ```



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

Reply via email to