pgandhi999 commented on a change in pull request #24149: [SPARK-27207] : Ensure 
aggregate buffers are initialized again for So…
URL: https://github.com/apache/spark/pull/24149#discussion_r267844944
 
 

 ##########
 File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/aggregate/ObjectAggregationIterator.scala
 ##########
 @@ -106,26 +110,28 @@ class ObjectAggregationIterator(
   //
   //  - when creating aggregation buffer for a new group in the hash map, and
   //  - when creating the re-used buffer for sort-based aggregation
-  private def createNewAggregationBuffer(): SpecificInternalRow = {
-    val bufferFieldTypes = 
aggregateFunctions.flatMap(_.aggBufferAttributes.map(_.dataType))
+  private def createNewAggregationBuffer(
+    functions: Array[AggregateFunction]): SpecificInternalRow = {
+    val bufferFieldTypes = 
functions.flatMap(_.aggBufferAttributes.map(_.dataType))
     val buffer = new SpecificInternalRow(bufferFieldTypes)
-    initAggregationBuffer(buffer)
+    initAggregationBuffer(buffer, functions)
     buffer
   }
 
-  private def initAggregationBuffer(buffer: SpecificInternalRow): Unit = {
+  private def initAggregationBuffer(
 
 Review comment:
   Done

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