viirya commented on a change in pull request #34701:
URL: https://github.com/apache/spark/pull/34701#discussion_r759506339



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala
##########
@@ -2162,6 +2163,74 @@ object RemoveLiteralFromGroupExpressions extends 
Rule[LogicalPlan] {
   }
 }
 
+/**
+ * Prunes unnecessary fields from a [[Generate]] if it is under a count 
aggregation
+ * query.
+ */
+object CountAggregateOptimization extends Rule[LogicalPlan] {

Review comment:
       Oh I see. Got your point. You mean not just targeting count-only 
aggregation, but also generally empty project cases.




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