AggregatorAggregationHandler

The base functionality of the aggregator, which defines how the aggregation of a single Sequence or column is done. It also provides information on which return type will be given, as KType, given a value type. It can also provide the index of the result in the input values if it is a selecting aggregator.

Inheritors

Properties

Link copied to clipboard

Reference to the aggregator instance.

Functions

Link copied to clipboard
abstract fun aggregateSequence(values: Sequence<Value?>, valueType: ValueType): Return

Base function of Aggregator.

Link copied to clipboard

Aggregates the data in the given column and computes a single resulting value. Calls aggregateSequence. It tries to exploit a cache for statistics which can be accessed by ValueColumnInternal

Link copied to clipboard
abstract fun calculateReturnType(valueType: KType, emptyInput: Boolean): KType

Function that can give the return type of aggregateSequence as KType, given the type of the input. This allows aggregators to avoid runtime type calculations.

Link copied to clipboard

Function that can give the index of the aggregation result in the input values, if it applies. This is used for AggregatorAggregationHandlers where Value== Return, and where the result exists in the input.

Link copied to clipboard
open fun init(aggregator: Aggregator<Value, Return>)