Class DistinctCountCPCSketchValueAggregator
- java.lang.Object
-
- org.apache.pinot.segment.local.aggregator.DistinctCountCPCSketchValueAggregator
-
- All Implemented Interfaces:
ValueAggregator<Object,org.apache.datasketches.cpc.CpcSketch>
public class DistinctCountCPCSketchValueAggregator extends Object implements ValueAggregator<Object,org.apache.datasketches.cpc.CpcSketch>
-
-
Field Summary
Fields Modifier and Type Field Description static FieldSpec.DataTypeAGGREGATED_VALUE_TYPE
-
Constructor Summary
Constructors Constructor Description DistinctCountCPCSketchValueAggregator(List<ExpressionContext> arguments)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.datasketches.cpc.CpcSketchapplyAggregatedValue(org.apache.datasketches.cpc.CpcSketch value, org.apache.datasketches.cpc.CpcSketch aggregatedValue)Applies an aggregated value to the current aggregated value.org.apache.datasketches.cpc.CpcSketchapplyRawValue(org.apache.datasketches.cpc.CpcSketch value, Object rawValue)Applies a raw value to the current aggregated value.org.apache.datasketches.cpc.CpcSketchcloneAggregatedValue(org.apache.datasketches.cpc.CpcSketch value)Clones an aggregated value.org.apache.datasketches.cpc.CpcSketchdeserializeAggregatedValue(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.org.apache.datasketches.cpc.CpcSketchgetInitialAggregatedValue(Object rawValue)Returns the initial aggregated value.intgetMaxAggregatedValueByteSize()Returns the maximum size in bytes of the aggregated values seen so far.byte[]serializeAggregatedValue(org.apache.datasketches.cpc.CpcSketch value)Serializes an aggregated value into a byte array.
-
-
-
Field Detail
-
AGGREGATED_VALUE_TYPE
public static final FieldSpec.DataType AGGREGATED_VALUE_TYPE
-
-
Constructor Detail
-
DistinctCountCPCSketchValueAggregator
public DistinctCountCPCSketchValueAggregator(List<ExpressionContext> arguments)
-
-
Method Detail
-
getAggregationType
public AggregationFunctionType getAggregationType()
Description copied from interface:ValueAggregatorReturns the type of the aggregation.- Specified by:
getAggregationTypein interfaceValueAggregator<Object,org.apache.datasketches.cpc.CpcSketch>
-
getAggregatedValueType
public FieldSpec.DataType getAggregatedValueType()
Description copied from interface:ValueAggregatorReturns the data type of the aggregated value.- Specified by:
getAggregatedValueTypein interfaceValueAggregator<Object,org.apache.datasketches.cpc.CpcSketch>
-
getInitialAggregatedValue
public org.apache.datasketches.cpc.CpcSketch getInitialAggregatedValue(Object rawValue)
Description copied from interface:ValueAggregatorReturns the initial aggregated value.- Specified by:
getInitialAggregatedValuein interfaceValueAggregator<Object,org.apache.datasketches.cpc.CpcSketch>
-
applyRawValue
public org.apache.datasketches.cpc.CpcSketch applyRawValue(org.apache.datasketches.cpc.CpcSketch 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,org.apache.datasketches.cpc.CpcSketch>
-
applyAggregatedValue
public org.apache.datasketches.cpc.CpcSketch applyAggregatedValue(org.apache.datasketches.cpc.CpcSketch value, org.apache.datasketches.cpc.CpcSketch 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,org.apache.datasketches.cpc.CpcSketch>
-
cloneAggregatedValue
public org.apache.datasketches.cpc.CpcSketch cloneAggregatedValue(org.apache.datasketches.cpc.CpcSketch value)
Description copied from interface:ValueAggregatorClones an aggregated value.- Specified by:
cloneAggregatedValuein interfaceValueAggregator<Object,org.apache.datasketches.cpc.CpcSketch>
-
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,org.apache.datasketches.cpc.CpcSketch>
-
serializeAggregatedValue
public byte[] serializeAggregatedValue(org.apache.datasketches.cpc.CpcSketch value)
Description copied from interface:ValueAggregatorSerializes an aggregated value into a byte array.- Specified by:
serializeAggregatedValuein interfaceValueAggregator<Object,org.apache.datasketches.cpc.CpcSketch>
-
deserializeAggregatedValue
public org.apache.datasketches.cpc.CpcSketch deserializeAggregatedValue(byte[] bytes)
Description copied from interface:ValueAggregatorDe-serializes an aggregated value from a byte array.- Specified by:
deserializeAggregatedValuein interfaceValueAggregator<Object,org.apache.datasketches.cpc.CpcSketch>
-
-