AggregateProcessor¶
AggregateProcessor is used by WindowExecBase unary physical operators when requested for windowFrameExpressionFactoryPairs to create the following WindowFunctionFrames (for supported AGGREGATE functions):
SlidingWindowFunctionFrameUnboundedFollowingWindowFunctionFrameUnboundedPrecedingWindowFunctionFrameUnboundedWindowFunctionFrame
Supported AGGREGATE Functions¶
AggregateProcessor is used for the following AGGREGATE functions:
- AggregateExpression
- AggregateWindowFunction
- OffsetWindowFunction with
RowFramewith (UnboundedPreceding, non-CurrentRow) frame
Creating Instance¶
AggregateProcessor takes the following to be created:
- Buffer Schema (
Array[AttributeReference]) - Initial
MutableProjection - Update
MutableProjection - Evaluate
MutableProjection - ImperativeAggregate
-
trackPartitionSizeflag
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:
WindowExecBaseunary physical operator is requested for windowFrameExpressionFactoryPairs
evaluate¶
evaluate(
target: InternalRow): Unit
evaluate...FIXME
evaluate is used when:
SlidingWindowFunctionFrameis requested towriteUnboundedFollowingWindowFunctionFrameis requested towriteUnboundedPrecedingWindowFunctionFrameis requested towriteUnboundedWindowFunctionFrameis requested toprepare
initialize¶
initialize(
size: Int): Unit
initialize...FIXME
initialize is used when:
SlidingWindowFunctionFrameis requested towriteUnboundedFollowingWindowFunctionFrameis requested towriteUnboundedPrecedingWindowFunctionFrameis requested toprepareUnboundedWindowFunctionFrameis requested toprepare
update¶
update(
input: InternalRow): Unit
update...FIXME
update is used when:
SlidingWindowFunctionFrameis requested towriteUnboundedFollowingWindowFunctionFrameis requested towriteUnboundedPrecedingWindowFunctionFrameis requested towriteUnboundedWindowFunctionFrameis requested toprepare