Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/15976#discussion_r89341307
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/aggregate/ObjectAggregationIterator.scala
 ---
    @@ -262,7 +262,9 @@ class SortBasedAggregator(
               // Firstly, update the aggregation buffer with input rows.
               while (hasNextInput &&
                 groupingKeyOrdering.compare(inputIterator.getKey, groupingKey) 
== 0) {
    -            processRow(result.aggregationBuffer, inputIterator.getValue)
    +            // Since `inputIterator.getValue` is an `UnsafeRow` whose 
underlying buffer will be
    +            // overwritten when `inputIterator` steps forward, we need to 
do a deep copy here.
    +            processRow(result.aggregationBuffer, 
inputIterator.getValue.copy())
    --- End diff --
    
    nvm, #15082 needs some significant refactor, we should get this fix in 2.1 
first.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to