Class SumPrecisionValueAggregator
- java.lang.Object
-
- org.apache.pinot.segment.local.aggregator.SumPrecisionValueAggregator
-
- All Implemented Interfaces:
ValueAggregator<Object,BigDecimal>
public class SumPrecisionValueAggregator extends Object implements ValueAggregator<Object,BigDecimal>
-
-
Field Summary
Fields Modifier and Type Field Description static FieldSpec.DataTypeAGGREGATED_VALUE_TYPE
-
Constructor Summary
Constructors Constructor Description SumPrecisionValueAggregator()
-
Method Summary
Modifier and Type Method Description BigDecimalapplyAggregatedValue(BigDecimal value, BigDecimal aggregatedValue)Applies an aggregated value to the current aggregated value.BigDecimalapplyRawValue(BigDecimal value, Object rawValue)Applies a raw value to the current aggregated value.BigDecimalcloneAggregatedValue(BigDecimal value)Clones an aggregated value.BigDecimaldeserializeAggregatedValue(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.BigDecimalgetInitialAggregatedValue(Object rawValue)Returns the initial aggregated value.intgetMaxAggregatedValueByteSize()Returns the maximum size in bytes of the aggregated values seen so far.byte[]serializeAggregatedValue(BigDecimal 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<Object,BigDecimal>
-
getAggregatedValueType
public FieldSpec.DataType getAggregatedValueType()
Description copied from interface:ValueAggregatorReturns the data type of the aggregated value.- Specified by:
getAggregatedValueTypein interfaceValueAggregator<Object,BigDecimal>
-
getInitialAggregatedValue
public BigDecimal getInitialAggregatedValue(Object rawValue)
Description copied from interface:ValueAggregatorReturns the initial aggregated value.- Specified by:
getInitialAggregatedValuein interfaceValueAggregator<Object,BigDecimal>
-
applyRawValue
public BigDecimal applyRawValue(BigDecimal value, Object 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<Object,BigDecimal>
-
applyAggregatedValue
public BigDecimal applyAggregatedValue(BigDecimal value, BigDecimal 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<Object,BigDecimal>
-
cloneAggregatedValue
public BigDecimal cloneAggregatedValue(BigDecimal value)
Description copied from interface:ValueAggregatorClones an aggregated value.- Specified by:
cloneAggregatedValuein interfaceValueAggregator<Object,BigDecimal>
-
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<Object,BigDecimal>
-
serializeAggregatedValue
public byte[] serializeAggregatedValue(BigDecimal value)
Description copied from interface:ValueAggregatorSerializes an aggregated value into a byte array.- Specified by:
serializeAggregatedValuein interfaceValueAggregator<Object,BigDecimal>
-
deserializeAggregatedValue
public BigDecimal deserializeAggregatedValue(byte[] bytes)
Description copied from interface:ValueAggregatorDe-serializes an aggregated value from a byte array.- Specified by:
deserializeAggregatedValuein interfaceValueAggregator<Object,BigDecimal>
-
-