Skip to content

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:

merge

merge(
  mutableAggBuffer: InternalRow,
  inputAggBuffer: InternalRow): Unit

Used when:

  • AggregatingAccumulator is requested to merge
  • AggregationIterator is requested to generateProcessRow

update

update(
  mutableAggBuffer: InternalRow,
  inputRow: InternalRow): Unit

Used when:

  • AggregatingAccumulator is requested to add an InternalRow
  • AggregationIterator is requested to generateProcessRow
  • AggregateProcessor is requested to update

Implementations

CodegenFallback

ImperativeAggregate is a CodegenFallback.