cloud-fan commented on a change in pull request #34701:
URL: https://github.com/apache/spark/pull/34701#discussion_r759945029
##########
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:
> also generally empty project cases.
Yea, and not only empty, e.g. `Project(1, child)` can also trigger the
optimization, as long as the Project has no references.
--
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]