HybridAggregationHandler

constructor(reducer: Reducer<Value, Return>, indexOfResult: IndexOfResult<Value>, getReturnType: CalculateReturnType)

Parameters

reducer

This function actually does the selection/reduction. Before it is called, nulls are filtered out. The type of the values is passed as KType to the selector.

indexOfResult

This function must be supplied to give the index of the result in the input values.

getReturnType

This function must be supplied to give the return type of reducer given some input type and whether the input is empty. When selecting, the return type is always typeOf<Value>() or typeOf<Value?>(), when reducing it can be anything.