maropu commented on a change in pull request #26534: 
[SPARK-29343][SQL][FOLLOW-UP] Remove AVG from order-insensitive aggregates in 
EliminateSorts
URL: https://github.com/apache/spark/pull/26534#discussion_r346764204
 
 

 ##########
 File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala
 ##########
 @@ -1006,7 +1006,6 @@ object EliminateSorts extends Rule[LogicalPlan] {
       case _: Min => true
       case _: Max => true
       case _: Count => true
-      case _: Average => true
 
 Review comment:
   Ur, right..., actually, as you said, all the aggregates for floating-point 
values are not commutative, so ISTM we cannot use this opt for these case. I'll 
update soon.

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

Reply via email to