AggregateProcessor¶
AggregateProcessor
is used by WindowExecBase unary physical operators when requested for windowFrameExpressionFactoryPairs to create the following WindowFunctionFrames (for supported AGGREGATE functions):
SlidingWindowFunctionFrame
UnboundedFollowingWindowFunctionFrame
UnboundedPrecedingWindowFunctionFrame
UnboundedWindowFunctionFrame
Supported AGGREGATE Functions¶
AggregateProcessor
is used for the following AGGREGATE
functions:
- AggregateExpression
- AggregateWindowFunction
- OffsetWindowFunction with
RowFrame
with (UnboundedPreceding
, non-CurrentRow
) frame
Creating Instance¶
AggregateProcessor
takes the following to be created:
- Buffer Schema (
Array[AttributeReference]
) - Initial
MutableProjection
- Update
MutableProjection
- Evaluate
MutableProjection
- ImperativeAggregate
-
trackPartitionSize
flag
AggregateProcessor
is created using apply factory.
Creating AggregateProcessor Instance¶
apply(
functions: Array[Expression],
ordinal: Int,
inputAttributes: Seq[Attribute],
newMutableProjection: (Seq[Expression], Seq[Attribute]) => MutableProjection
): AggregateProcessor
apply
creates an AggregateProcessor.
apply
is used when:
WindowExecBase
unary physical operator is requested for windowFrameExpressionFactoryPairs
evaluate¶
evaluate(
target: InternalRow): Unit
evaluate
...FIXME
evaluate
is used when:
SlidingWindowFunctionFrame
is requested towrite
UnboundedFollowingWindowFunctionFrame
is requested towrite
UnboundedPrecedingWindowFunctionFrame
is requested towrite
UnboundedWindowFunctionFrame
is requested toprepare
initialize¶
initialize(
size: Int): Unit
initialize
...FIXME
initialize
is used when:
SlidingWindowFunctionFrame
is requested towrite
UnboundedFollowingWindowFunctionFrame
is requested towrite
UnboundedPrecedingWindowFunctionFrame
is requested toprepare
UnboundedWindowFunctionFrame
is requested toprepare
update¶
update(
input: InternalRow): Unit
update
...FIXME
update
is used when:
SlidingWindowFunctionFrame
is requested towrite
UnboundedFollowingWindowFunctionFrame
is requested towrite
UnboundedPrecedingWindowFunctionFrame
is requested towrite
UnboundedWindowFunctionFrame
is requested toprepare