cloud-fan commented on code in PR #40915:
URL: https://github.com/apache/spark/pull/40915#discussion_r1175104259
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/aggregate/ObjectAggregationIterator.scala:
##########
@@ -231,11 +224,15 @@ class SortBasedAggregator(
groupingSchema: StructType,
processRow: (InternalRow, InternalRow) => Unit,
mergeAggregationBuffers: (InternalRow, InternalRow) => Unit,
- makeEmptyAggregationBuffer: => InternalRow) {
+ aggregationBufferSize: Int,
+ initializeBuffer: InternalRow => Unit) {
// external sorter to sort the input (grouping key + input row) with
grouping key.
private val inputSorter = createExternalSorterForInput()
private val groupingKeyOrdering: BaseOrdering =
GenerateOrdering.create(groupingSchema)
+ // A reused aggregation buffer which should be initialized when finding a
new grouping key
Review Comment:
```suggestion
// A reused aggregation buffer which should be reset when finding a new
grouping key
```
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]