FlatteningMultipleColumnsHandler

Implementation of AggregatorMultipleColumnsHandler that simply flattens all input columns. This is useful for aggregators that depend on the distribution of values across multiple columns.

See also

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
open override var aggregator: Aggregator<Value, Return>?

Reference to the aggregator instance.

Functions

Link copied to clipboard
open override fun aggregateMultipleColumns(columns: Sequence<DataColumn<Value?>>): Return

Aggregates the data in the multiple given columns and computes a single resulting value. The columns are flattened into a single list of values; then the aggregation function is called with the common type of the columns.

Link copied to clipboard
open override fun calculateReturnTypeMultipleColumns(colTypes: Set<KType>, colsEmpty: Boolean): KType

Function that can give the return type of aggregateMultipleColumns, given types of the columns. This allows aggregators to avoid runtime type calculations.

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