pgandhi999 commented on issue #24149: [SPARK-27207] : Ensure aggregate buffers 
are initialized again for So…
URL: https://github.com/apache/spark/pull/24149#issuecomment-478107282
 
 
   @cloud-fan So I realized that the bug was caused as I was creating the 
aggregate buffer for `sortBasedMergeAggFunctions`, calling `processRow` on 
`update` operation with `aggregateFunctions` and then calling `merge` once 
again with `sortBasedMergeAggFunctions`. Fixed the bug by having a separate 
update buffer initialized with `aggregateFunctions`, perform the `update` on 
that buffer, merge it's results to a new aggregate buffer initialized for 
`sortBasedMergeAggFunctions`, finally on which `merge` is called and the final 
result is returned. It may not be the best solution so your valuable guidance 
in this matter is really appreciated. Thank you.

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