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