initialize(size: Int): Unit
AggregateProcessor
AggregateProcessor
is created and used exclusively when WindowExec
physical operator is executed.
AggregateProcessor
supports DeclarativeAggregate and ImperativeAggregate aggregate functions only (which happen to be AggregateFunction in AggregateExpression or AggregateWindowFunction).
Name | Description |
---|---|
|
initialize
Method
Caution
|
FIXME |
Note
|
|
apply
Factory Method
apply(
functions: Array[Expression],
ordinal: Int,
inputAttributes: Seq[Attribute],
newMutableProjection: (Seq[Expression], Seq[Attribute]) => MutableProjection): AggregateProcessor
Note
|
apply is used exclusively when WindowExec is executed (and creates WindowFunctionFrame per AGGREGATE window aggregate functions, i.e. AggregateExpression or AggregateWindowFunction)
|
Executing update on ImperativeAggregates — update
Method
update(input: InternalRow): Unit
update
executes the update method on every input ImperativeAggregate sequentially (one by one).
Internally, update
joins buffer with input
internal binary row and converts the joined InternalRow
using the MutableProjection function.
update
then requests every ImperativeAggregate to update passing in the buffer and the input input
rows.
Note
|
MutableProjection mutates the same underlying binary row object each time it is executed.
|
Creating AggregateProcessor Instance
AggregateProcessor
takes the following when created:
-
Schema of the buffer (as a collection of
AttributeReferences
) -
ImperativeAggregate expressions for aggregate functions