Class OrderedAggregateLambdaFactory<TSource,TKey,TSortKey,TOrigAccumulate,TResult>
- java.lang.Object
-
- org.apache.calcite.adapter.enumerable.OrderedAggregateLambdaFactory<TSource,TKey,TSortKey,TOrigAccumulate,TResult>
-
- Type Parameters:
TSource
- Type of the enumerable input sourceTKey
- Type of the group-by keyTSortKey
- Type of the sort keyTOrigAccumulate
- Type of the original accumulatorTResult
- Type of the enumerable output result
- All Implemented Interfaces:
AggregateLambdaFactory<TSource,TOrigAccumulate,OrderedAggregateLambdaFactory.LazySource<TSource>,TResult,TKey>
public class OrderedAggregateLambdaFactory<TSource,TKey,TSortKey,TOrigAccumulate,TResult> extends java.lang.Object implements AggregateLambdaFactory<TSource,TOrigAccumulate,OrderedAggregateLambdaFactory.LazySource<TSource>,TResult,TKey>
Generate aggregate lambdas that sorts the input source before calling each aggregate adder.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
OrderedAggregateLambdaFactory.LazySource<TSource>
Cache the input sources.
-
Field Summary
Fields Modifier and Type Field Description private Function0<TOrigAccumulate>
accumulatorInitializer
private java.util.List<SourceSorter<TOrigAccumulate,TSource,TSortKey>>
sourceSorters
-
Constructor Summary
Constructors Constructor Description OrderedAggregateLambdaFactory(Function0<TOrigAccumulate> accumulatorInitializer, java.util.List<SourceSorter<TOrigAccumulate,TSource,TSortKey>> sourceSorters)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Function2<OrderedAggregateLambdaFactory.LazySource<TSource>,TSource,OrderedAggregateLambdaFactory.LazySource<TSource>>
accumulatorAdder()
Function0<OrderedAggregateLambdaFactory.LazySource<TSource>>
accumulatorInitializer()
Function2<TKey,OrderedAggregateLambdaFactory.LazySource<TSource>,TResult>
resultSelector(Function2<TKey,TOrigAccumulate,TResult> resultSelector)
Function1<OrderedAggregateLambdaFactory.LazySource<TSource>,TResult>
singleGroupResultSelector(Function1<TOrigAccumulate,TResult> resultSelector)
-
-
-
Field Detail
-
accumulatorInitializer
private final Function0<TOrigAccumulate> accumulatorInitializer
-
sourceSorters
private final java.util.List<SourceSorter<TOrigAccumulate,TSource,TSortKey>> sourceSorters
-
-
Constructor Detail
-
OrderedAggregateLambdaFactory
public OrderedAggregateLambdaFactory(Function0<TOrigAccumulate> accumulatorInitializer, java.util.List<SourceSorter<TOrigAccumulate,TSource,TSortKey>> sourceSorters)
-
-
Method Detail
-
accumulatorInitializer
public Function0<OrderedAggregateLambdaFactory.LazySource<TSource>> accumulatorInitializer()
- Specified by:
accumulatorInitializer
in interfaceAggregateLambdaFactory<TSource,TKey,TSortKey,TOrigAccumulate,TResult>
-
accumulatorAdder
public Function2<OrderedAggregateLambdaFactory.LazySource<TSource>,TSource,OrderedAggregateLambdaFactory.LazySource<TSource>> accumulatorAdder()
- Specified by:
accumulatorAdder
in interfaceAggregateLambdaFactory<TSource,TKey,TSortKey,TOrigAccumulate,TResult>
-
singleGroupResultSelector
public Function1<OrderedAggregateLambdaFactory.LazySource<TSource>,TResult> singleGroupResultSelector(Function1<TOrigAccumulate,TResult> resultSelector)
- Specified by:
singleGroupResultSelector
in interfaceAggregateLambdaFactory<TSource,TKey,TSortKey,TOrigAccumulate,TResult>
-
resultSelector
public Function2<TKey,OrderedAggregateLambdaFactory.LazySource<TSource>,TResult> resultSelector(Function2<TKey,TOrigAccumulate,TResult> resultSelector)
- Specified by:
resultSelector
in interfaceAggregateLambdaFactory<TSource,TKey,TSortKey,TOrigAccumulate,TResult>
-
-