ImperativeAggregate Expressions¶
ImperativeAggregate is an extension of the AggregateFunction abstraction for aggregate functions that are expressed using imperative initialize, merge and update methods (that operate on Row-based aggregation buffers).
Contract (Subset)¶
initialize¶
initialize(
mutableAggBuffer: InternalRow): Unit
Used when:
EliminateAggregateFilterlogical optimization is executedAggregatingAccumulatoris requested to createBufferAggregationIteratoris requested to initializeBufferObjectAggregationIteratoris requested to initAggregationBufferTungstenAggregationIteratoris requested to createNewAggregationBufferAggregateProcessoris requested to initialize
merge¶
merge(
mutableAggBuffer: InternalRow,
inputAggBuffer: InternalRow): Unit
Used when:
AggregatingAccumulatoris requested to mergeAggregationIteratoris requested to generateProcessRow
update¶
update(
mutableAggBuffer: InternalRow,
inputRow: InternalRow): Unit
Used when:
AggregatingAccumulatoris requested to add a valueAggregationIteratoris requested to generateProcessRowAggregateProcessoris requested to update
Implementations¶
HyperLogLogPlusPlusPivotFirst- ScalaUDAF
- TypedImperativeAggregate
CodegenFallback¶
ImperativeAggregate is a CodegenFallback.