Class SingleTypedHistogram
- java.lang.Object
-
- io.prestosql.operator.aggregation.histogram.SingleTypedHistogram
-
- All Implemented Interfaces:
TypedHistogram
public class SingleTypedHistogram extends Object implements TypedHistogram
-
-
Constructor Summary
Constructors Constructor Description SingleTypedHistogram(Block block, Type type, BlockTypeOperators.BlockPositionEqual equalOperator, BlockTypeOperators.BlockPositionHashCode hashCodeOperator, int expectedSize)
SingleTypedHistogram(Type type, BlockTypeOperators.BlockPositionEqual equalOperator, BlockTypeOperators.BlockPositionHashCode hashCodeOperator, int expectedSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(int position, Block block, long count)
void
addAll(TypedHistogram other)
long
getEstimatedSize()
int
getExpectedSize()
Type
getType()
boolean
isEmpty()
void
readAllValues(HistogramValueReader reader)
void
serialize(BlockBuilder out)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.prestosql.operator.aggregation.histogram.TypedHistogram
ensureCapacity, setGroupId
-
-
-
-
Constructor Detail
-
SingleTypedHistogram
public SingleTypedHistogram(Type type, BlockTypeOperators.BlockPositionEqual equalOperator, BlockTypeOperators.BlockPositionHashCode hashCodeOperator, int expectedSize)
-
SingleTypedHistogram
public SingleTypedHistogram(Block block, Type type, BlockTypeOperators.BlockPositionEqual equalOperator, BlockTypeOperators.BlockPositionHashCode hashCodeOperator, int expectedSize)
-
-
Method Detail
-
getEstimatedSize
public long getEstimatedSize()
- Specified by:
getEstimatedSize
in interfaceTypedHistogram
-
serialize
public void serialize(BlockBuilder out)
- Specified by:
serialize
in interfaceTypedHistogram
-
addAll
public void addAll(TypedHistogram other)
- Specified by:
addAll
in interfaceTypedHistogram
-
readAllValues
public void readAllValues(HistogramValueReader reader)
- Specified by:
readAllValues
in interfaceTypedHistogram
-
add
public void add(int position, Block block, long count)
- Specified by:
add
in interfaceTypedHistogram
-
getType
public Type getType()
- Specified by:
getType
in interfaceTypedHistogram
-
getExpectedSize
public int getExpectedSize()
- Specified by:
getExpectedSize
in interfaceTypedHistogram
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfaceTypedHistogram
-
-