c21 commented on a change in pull request #31340:
URL: https://github.com/apache/spark/pull/31340#discussion_r564282252



##########
File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/aggregate/ObjectAggregationIterator.scala
##########
@@ -57,6 +59,10 @@ class ObjectAggregationIterator(
 
   private[this] var aggBufferIterator: Iterator[AggregationBufferEntry] = _
 
+  // Remember spill data size of this task before execute this operator so 
that we can
+  // figure out how many bytes we spilled for this operator.
+  private val spillSizeBefore = 
TaskContext.get().taskMetrics().memoryBytesSpilled

Review comment:
       This is same as [hash 
aggregate](https://github.com/apache/spark/blob/master/sql/core/src/main/scala/org/apache/spark/sql/execution/aggregate/TungstenAggregationIterator.scala#L113).




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



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

Reply via email to