Class SumValueAggregator
- java.lang.Object
-
- org.apache.pinot.segment.local.aggregator.SumValueAggregator
-
- All Implemented Interfaces:
ValueAggregator<Number,Double>
public class SumValueAggregator extends Object implements ValueAggregator<Number,Double>
-
-
Field Summary
Fields Modifier and Type Field Description static FieldSpec.DataTypeAGGREGATED_VALUE_TYPE
-
Constructor Summary
Constructors Constructor Description SumValueAggregator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DoubleapplyAggregatedValue(Double value, Double aggregatedValue)Applies an aggregated value to the current aggregated value.DoubleapplyRawValue(Double value, Number rawValue)Applies a raw value to the current aggregated value.DoublecloneAggregatedValue(Double value)Clones an aggregated value.DoubledeserializeAggregatedValue(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.DoublegetInitialAggregatedValue(Number rawValue)Returns the initial aggregated value.intgetMaxAggregatedValueByteSize()Returns the maximum size in bytes of the aggregated values seen so far.byte[]serializeAggregatedValue(Double value)Serializes an aggregated value into a byte array.
-
-
-
Field Detail
-
AGGREGATED_VALUE_TYPE
public static final FieldSpec.DataType AGGREGATED_VALUE_TYPE
-
-
Method Detail
-
getAggregationType
public AggregationFunctionType getAggregationType()
Description copied from interface:ValueAggregatorReturns the type of the aggregation.- Specified by:
getAggregationTypein interfaceValueAggregator<Number,Double>
-
getAggregatedValueType
public FieldSpec.DataType getAggregatedValueType()
Description copied from interface:ValueAggregatorReturns the data type of the aggregated value.- Specified by:
getAggregatedValueTypein interfaceValueAggregator<Number,Double>
-
getInitialAggregatedValue
public Double getInitialAggregatedValue(Number rawValue)
Description copied from interface:ValueAggregatorReturns the initial aggregated value.- Specified by:
getInitialAggregatedValuein interfaceValueAggregator<Number,Double>
-
applyRawValue
public Double applyRawValue(Double value, Number rawValue)
Description copied from interface:ValueAggregatorApplies a raw value to the current aggregated value.NOTE: if value is mutable, will directly modify the value.
- Specified by:
applyRawValuein interfaceValueAggregator<Number,Double>
-
applyAggregatedValue
public Double applyAggregatedValue(Double value, Double aggregatedValue)
Description copied from interface:ValueAggregatorApplies an aggregated value to the current aggregated value.NOTE: if value is mutable, will directly modify the value.
- Specified by:
applyAggregatedValuein interfaceValueAggregator<Number,Double>
-
cloneAggregatedValue
public Double cloneAggregatedValue(Double value)
Description copied from interface:ValueAggregatorClones an aggregated value.- Specified by:
cloneAggregatedValuein interfaceValueAggregator<Number,Double>
-
getMaxAggregatedValueByteSize
public int getMaxAggregatedValueByteSize()
Description copied from interface:ValueAggregatorReturns the maximum size in bytes of the aggregated values seen so far.- Specified by:
getMaxAggregatedValueByteSizein interfaceValueAggregator<Number,Double>
-
serializeAggregatedValue
public byte[] serializeAggregatedValue(Double value)
Description copied from interface:ValueAggregatorSerializes an aggregated value into a byte array.- Specified by:
serializeAggregatedValuein interfaceValueAggregator<Number,Double>
-
deserializeAggregatedValue
public Double deserializeAggregatedValue(byte[] bytes)
Description copied from interface:ValueAggregatorDe-serializes an aggregated value from a byte array.- Specified by:
deserializeAggregatedValuein interfaceValueAggregator<Number,Double>
-
-