Class LazyAggregateLambdaFactory<TSource,TKey,TOrigAccumulate,TResult>
java.lang.Object
org.apache.calcite.adapter.enumerable.LazyAggregateLambdaFactory<TSource,TKey,TOrigAccumulate,TResult>
- Type Parameters:
TSource
- Type of the enumerable input sourceTKey
- Type of the group-by keyTOrigAccumulate
- Type of the original accumulatorTResult
- Type of the enumerable output result
- All Implemented Interfaces:
AggregateLambdaFactory<TSource,
TOrigAccumulate, LazyAggregateLambdaFactory.LazySource<TSource>, TResult, TKey>
public class LazyAggregateLambdaFactory<TSource,TKey,TOrigAccumulate,TResult>
extends Object
implements AggregateLambdaFactory<TSource,TOrigAccumulate,LazyAggregateLambdaFactory.LazySource<TSource>,TResult,TKey>
Generate aggregate lambdas that preserve the input source before calling each
aggregate adder, this implementation is generally used when we need to sort the input
before performing aggregation.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Accumulate on the cached input sources.static class
Cache the input sources. -
Constructor Summary
ConstructorDescriptionLazyAggregateLambdaFactory
(Function0<TOrigAccumulate> accumulatorInitializer, List<LazyAggregateLambdaFactory.LazyAccumulator<TOrigAccumulate, TSource>> accumulators) -
Method Summary
Modifier and TypeMethodDescriptionFunction2<LazyAggregateLambdaFactory.LazySource<TSource>,
TSource, LazyAggregateLambdaFactory.LazySource<TSource>> resultSelector
(Function2<TKey, TOrigAccumulate, TResult> resultSelector) singleGroupResultSelector
(Function1<TOrigAccumulate, TResult> resultSelector)
-
Constructor Details
-
LazyAggregateLambdaFactory
public LazyAggregateLambdaFactory(Function0<TOrigAccumulate> accumulatorInitializer, List<LazyAggregateLambdaFactory.LazyAccumulator<TOrigAccumulate, TSource>> accumulators)
-
-
Method Details
-
accumulatorInitializer
- Specified by:
accumulatorInitializer
in interfaceAggregateLambdaFactory<TSource,
TOrigAccumulate, LazyAggregateLambdaFactory.LazySource<TSource>, TResult, TKey>
-
accumulatorAdder
public Function2<LazyAggregateLambdaFactory.LazySource<TSource>,TSource, accumulatorAdder()LazyAggregateLambdaFactory.LazySource<TSource>> - Specified by:
accumulatorAdder
in interfaceAggregateLambdaFactory<TSource,
TOrigAccumulate, LazyAggregateLambdaFactory.LazySource<TSource>, TResult, TKey>
-
singleGroupResultSelector
public Function1<LazyAggregateLambdaFactory.LazySource<TSource>,TResult> singleGroupResultSelector(Function1<TOrigAccumulate, TResult> resultSelector) - Specified by:
singleGroupResultSelector
in interfaceAggregateLambdaFactory<TSource,
TOrigAccumulate, LazyAggregateLambdaFactory.LazySource<TSource>, TResult, TKey>
-
resultSelector
public Function2<TKey,LazyAggregateLambdaFactory.LazySource<TSource>, resultSelectorTResult> (Function2<TKey, TOrigAccumulate, TResult> resultSelector) - Specified by:
resultSelector
in interfaceAggregateLambdaFactory<TSource,
TOrigAccumulate, LazyAggregateLambdaFactory.LazySource<TSource>, TResult, TKey>
-