expressions for grouping keys
AggregateExpression2 containing AggregateFunction2s with mode Partial, PartialMerge, or Final.
AggregateExpression2 containing AggregateFunction2s with mode Complete.
If this iterator is used to handle functions with mode PartialMerge or Final.
The input rows have the format of grouping keys + aggregation buffer
.
This offset indicates the starting position of aggregation buffer in a input row.
expressions for generating output rows.
the function used to create mutable projections.
attributes of representing input rows from inputIter
.
(Changed in version 2.8.0) collect
has changed. The previous behavior can be reproduced with toSeq
.
Free memory used in the underlying map.
Generate a output row when there is no input and there is no grouping expression.
Start processing input rows.
Start processing input rows. Only after this method is called will this iterator be non-empty.
An iterator used to evaluate aggregate functions. It operates on UnsafeRows.
This iterator first uses hash-based aggregation to process input rows. It uses a hash map to store groups and their corresponding aggregation buffers. If we this map cannot allocate memory from org.apache.spark.shuffle.ShuffleMemoryManager, it switches to sort-based aggregation. The process of the switch has the following step:
The code of this class is organized as follows: