public abstract class NullableAggregatorFactory<T extends BaseNullableColumnValueSelector> extends AggregatorFactory
Aggregator, BufferAggregator and AggregateCombiner
to support nullable aggregations for SQL compatibility. Implementations of AggregatorFactory which need to
Support Nullable Aggregations are encouraged to extend this class.| Constructor and Description |
|---|
NullableAggregatorFactory() |
| Modifier and Type | Method and Description |
|---|---|
Aggregator |
factorize(ColumnSelectorFactory metricFactory) |
protected abstract Aggregator |
factorize(ColumnSelectorFactory metricFactory,
T selector)
Creates an
Aggregator to aggregate values from several rows, by using the provided selector. |
BufferAggregator |
factorizeBuffered(ColumnSelectorFactory metricFactory) |
protected abstract BufferAggregator |
factorizeBuffered(ColumnSelectorFactory metricFactory,
T selector)
Creates an
BufferAggregator to aggregate values from several rows into a ByteBuffer. |
int |
getMaxIntermediateSizeWithNulls()
Returns the maximum size that this aggregator will require in bytes for intermediate storage of results.
|
AggregateCombiner |
makeNullableAggregateCombiner()
Creates an
AggregateCombiner which supports nullability. |
protected abstract T |
selector(ColumnSelectorFactory metricFactory)
Creates a
ColumnValueSelector for the aggregated column. |
combine, deserialize, finalizeComputation, getCombiningFactory, getComparator, getMaxIntermediateSize, getMergingFactory, getName, getRequiredColumns, getTypeName, makeAggregateCombiner, mergeAggregators, optimizeForSegment, requiredFieldsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetCacheKeypublic final Aggregator factorize(ColumnSelectorFactory metricFactory)
factorize in class AggregatorFactorypublic final BufferAggregator factorizeBuffered(ColumnSelectorFactory metricFactory)
factorizeBuffered in class AggregatorFactorypublic final AggregateCombiner makeNullableAggregateCombiner()
AggregatorFactoryAggregateCombiner which supports nullability.
Implementations of AggregatorFactory which need to Support Nullable Aggregations are encouraged
to extend NullableAggregatorFactory instead of overriding this method.
Default implementation calls AggregatorFactory.makeAggregateCombiner() for backwards compatibility.makeNullableAggregateCombiner in class AggregatorFactoryAggregateCombiner,
NullableAggregatorFactorypublic final int getMaxIntermediateSizeWithNulls()
AggregatorFactoryAggregatorFactory which need to Support Nullable Aggregations are encouraged
to extend NullableAggregatorFactory instead of overriding this method.
Default implementation calls AggregatorFactory.makeAggregateCombiner() for backwards compatibility.getMaxIntermediateSizeWithNulls in class AggregatorFactoryprotected abstract T selector(ColumnSelectorFactory metricFactory)
ColumnValueSelector for the aggregated column.ColumnValueSelectorprotected abstract Aggregator factorize(ColumnSelectorFactory metricFactory, T selector)
Aggregator to aggregate values from several rows, by using the provided selector.metricFactory - metricFactoryselector - ColumnValueSelector for the column to aggregate.Aggregatorprotected abstract BufferAggregator factorizeBuffered(ColumnSelectorFactory metricFactory, T selector)
BufferAggregator to aggregate values from several rows into a ByteBuffer.metricFactory - metricFactoryselector - ColumnValueSelector for the column to aggregate.BufferAggregatorCopyright © 2011–2019 The Apache Software Foundation. All rights reserved.