Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/19488#discussion_r145281119
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/planning/patterns.scala
 ---
    @@ -235,8 +236,16 @@ object PhysicalAggregation {
             expr.transformDown {
               case ae: AggregateExpression =>
                 // The final aggregation buffer's attributes will be 
`finalAggregationAttributes`,
    -            // so replace each aggregate expression by its corresponding 
attribute in the set:
    -            ae.resultAttribute
    +            // so replace each aggregate expression by its corresponding 
attribute in the set.
    +            // Note that non-deterministic aggregate expressions should 
not be deduplicated and
    +            // should be handled differently.
    +            val newAe = if (ae.deterministic) {
    --- End diff --
    
    Do we still need to consider this? They will be different anyway, right?


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to