AggregationIterator — Generic Iterator of UnsafeRows for Aggregate Physical Operators
AggregationIterator is the base for iterators of UnsafeRows that…FIXME
Iterators are data structures that allow to iterate over a sequence of elements. They have a
hasNextmethod for checking if there is a next element available, and anextmethod which returns the next element and discards it from the iterator.
| Name | Description | ||
|---|---|---|---|
|
Used exclusively when |
|||
|
Used exclusively when |
|||
|
Used exclusively when
|
| Name | Description |
|---|---|
|
Used when…FIXME |
|
|
ImperativeAggregate functions Used when…FIXME |
|
|
Positions Used when…FIXME |
|
|
Used when…FIXME |
|
|
|
Function used to generate an unsafe row (i.e. Used when:
|
|
Grouping attributes Used when…FIXME |
|
|
Used when…FIXME |
|
|
Used when…FIXME |
Creating AggregationIterator Instance
AggregationIterator takes the following when created:
-
Grouping named expressions
-
Input attributes
-
Aggregate attributes
-
Result named expressions
-
Function to create a new
MutableProjectiongiven expressions and attributes
AggregationIterator initializes the internal registries and counters.
|
Note
|
AggregationIterator is a Scala abstract class and cannot be created directly. It is created indirectly for the concrete AggregationIterators.
|
initializeAggregateFunctions Internal Method
|
1 2 3 4 5 6 7 |
initializeAggregateFunctions( expressions: Seq[AggregateExpression], startingInputBufferOffset: Int): Array[AggregateFunction] |
initializeAggregateFunctions…FIXME
|
Note
|
initializeAggregateFunctions is used when…FIXME
|
generateProcessRow Internal Method
|
1 2 3 4 5 6 7 8 |
generateProcessRow( expressions: Seq[AggregateExpression], functions: Seq[AggregateFunction], inputAttributes: Seq[Attribute]): (InternalRow, InternalRow) => Unit |
generateProcessRow…FIXME
|
Note
|
generateProcessRow is used when…FIXME
|
generateResultProjection Method
|
1 2 3 4 5 |
generateResultProjection(): (UnsafeRow, InternalRow) => UnsafeRow |
generateResultProjection…FIXME
|
Note
|
|
spark技术分享