Class BasicAggregateLambdaFactory<TSource,TAccumulate,TResult,TKey>
java.lang.Object
org.apache.calcite.adapter.enumerable.BasicAggregateLambdaFactory<TSource,TAccumulate,TResult,TKey>
- Type Parameters:
TSource
- Type of the enumerable input sourceTAccumulate
- Type of the accumulatorTResult
- Type of the enumerable output resultTKey
- Type of the group-by key
- All Implemented Interfaces:
AggregateLambdaFactory<TSource,
TAccumulate, TAccumulate, TResult, TKey>
public class BasicAggregateLambdaFactory<TSource,TAccumulate,TResult,TKey>
extends Object
implements AggregateLambdaFactory<TSource,TAccumulate,TAccumulate,TResult,TKey>
Implementation of
AggregateLambdaFactory
that applies a sequence of
accumulator adders to input source.-
Constructor Summary
ConstructorDescriptionBasicAggregateLambdaFactory
(Function0<TAccumulate> accumulatorInitializer, List<Function2<TAccumulate, TSource, TAccumulate>> accumulatorAdders) -
Method Summary
Modifier and TypeMethodDescriptionresultSelector
(Function2<TKey, TAccumulate, TResult> resultSelector) singleGroupResultSelector
(Function1<TAccumulate, TResult> resultSelector)
-
Constructor Details
-
BasicAggregateLambdaFactory
public BasicAggregateLambdaFactory(Function0<TAccumulate> accumulatorInitializer, List<Function2<TAccumulate, TSource, TAccumulate>> accumulatorAdders)
-
-
Method Details
-
accumulatorInitializer
- Specified by:
accumulatorInitializer
in interfaceAggregateLambdaFactory<TSource,
TAccumulate, TAccumulate, TResult, TKey>
-
accumulatorAdder
- Specified by:
accumulatorAdder
in interfaceAggregateLambdaFactory<TSource,
TAccumulate, TAccumulate, TResult, TKey>
-
singleGroupResultSelector
public Function1<TAccumulate,TResult> singleGroupResultSelector(Function1<TAccumulate, TResult> resultSelector) - Specified by:
singleGroupResultSelector
in interfaceAggregateLambdaFactory<TSource,
TAccumulate, TAccumulate, TResult, TKey>
-
resultSelector
public Function2<TKey,TAccumulate, resultSelectorTResult> (Function2<TKey, TAccumulate, TResult> resultSelector) - Specified by:
resultSelector
in interfaceAggregateLambdaFactory<TSource,
TAccumulate, TAccumulate, TResult, TKey>
-