HyukjinKwon commented on a change in pull request #32904:
URL: https://github.com/apache/spark/pull/32904#discussion_r651698103
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/RemoveRedundantAggregates.scala
##########
@@ -67,4 +67,8 @@ object RemoveRedundantAggregates extends Rule[LogicalPlan]
with AliasHelper {
upperHasNoDuplicateSensitiveAgg && upperRefsOnlyDeterministicNonAgg
}
+
+ private def isDuplicateSensitive(ae: AggregateExpression): Boolean = {
+ !ae.isDistinct &&
!EliminateDistinct.isDuplicateAgnostic(ae.aggregateFunction)
Review comment:
If aggregate expr is distinct, it would make sense to consider it
DuplicateAgnostic .. ?
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]