Interface ValueAggregator<R,A>
-
- Type Parameters:
R- Type of the raw value (non-aggregated)A- Type of the aggregated value
- All Known Implementing Classes:
AvgValueAggregator,CountValueAggregator,DistinctCountBitmapValueAggregator,DistinctCountCPCSketchValueAggregator,DistinctCountHLLPlusValueAggregator,DistinctCountHLLValueAggregator,DistinctCountThetaSketchValueAggregator,DistinctCountULLValueAggregator,IntegerTupleSketchValueAggregator,MaxValueAggregator,MinMaxRangeValueAggregator,MinValueAggregator,PercentileEstValueAggregator,PercentileTDigestValueAggregator,SumPrecisionValueAggregator,SumValueAggregator
public interface ValueAggregator<R,A>A value aggregator that pre-aggregates on the input values for a specific type of aggregation.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AapplyAggregatedValue(A value, A aggregatedValue)Applies an aggregated value to the current aggregated value.AapplyRawValue(A value, R rawValue)Applies a raw value to the current aggregated value.AcloneAggregatedValue(A value)Clones an aggregated value.AdeserializeAggregatedValue(byte[] bytes)De-serializes an aggregated value from a byte array.FieldSpec.DataTypegetAggregatedValueType()Returns the data type of the aggregated value.AggregationFunctionTypegetAggregationType()Returns the type of the aggregation.AgetInitialAggregatedValue(R rawValue)Returns the initial aggregated value.intgetMaxAggregatedValueByteSize()Returns the maximum size in bytes of the aggregated values seen so far.byte[]serializeAggregatedValue(A value)Serializes an aggregated value into a byte array.
-
-
-
Method Detail
-
getAggregationType
AggregationFunctionType getAggregationType()
Returns the type of the aggregation.
-
getAggregatedValueType
FieldSpec.DataType getAggregatedValueType()
Returns the data type of the aggregated value.
-
getInitialAggregatedValue
A getInitialAggregatedValue(R rawValue)
Returns the initial aggregated value.
-
applyRawValue
A applyRawValue(A value, R rawValue)
Applies a raw value to the current aggregated value.NOTE: if value is mutable, will directly modify the value.
-
applyAggregatedValue
A applyAggregatedValue(A value, A aggregatedValue)
Applies an aggregated value to the current aggregated value.NOTE: if value is mutable, will directly modify the value.
-
getMaxAggregatedValueByteSize
int getMaxAggregatedValueByteSize()
Returns the maximum size in bytes of the aggregated values seen so far.
-
serializeAggregatedValue
byte[] serializeAggregatedValue(A value)
Serializes an aggregated value into a byte array.
-
deserializeAggregatedValue
A deserializeAggregatedValue(byte[] bytes)
De-serializes an aggregated value from a byte array.
-
-