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

    https://github.com/apache/spark/pull/19082#discussion_r156249393
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/aggregate/HashAggregateExec.scala
 ---
    @@ -269,28 +343,50 @@ case class HashAggregateExec(
               
e.aggregateFunction.asInstanceOf[DeclarativeAggregate].mergeExpressions
           }
         }
    -    ctx.currentVars = bufVars ++ input
    +
    +    // We need to copy the aggregation buffer to local variables first 
because each aggregate
    +    // function directly updates the buffer when it finishes.
    --- End diff --
    
    just FYI: we must need local copys from this discussions, too 
https://github.com/apache/spark/pull/19865


---

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

Reply via email to