Class SingleHistogramState
- java.lang.Object
-
- io.trino.operator.aggregation.histogram.SingleHistogramState
-
- All Implemented Interfaces:
HistogramState,AccumulatorState
public class SingleHistogramState extends Object implements HistogramState
-
-
Constructor Summary
Constructors Constructor Description SingleHistogramState(Type keyType, BlockTypeOperators.BlockPositionEqual equalOperator, BlockTypeOperators.BlockPositionHashCode hashCodeOperator, int expectedEntriesCount)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddMemoryUsage(long memory)voiddeserialize(Block block, int expectedSize)TypedHistogramget()will create an empty histogram if none existslonggetEstimatedSize()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.trino.spi.function.AccumulatorState
copy
-
-
-
-
Constructor Detail
-
SingleHistogramState
public SingleHistogramState(Type keyType, BlockTypeOperators.BlockPositionEqual equalOperator, BlockTypeOperators.BlockPositionHashCode hashCodeOperator, int expectedEntriesCount)
-
-
Method Detail
-
get
public TypedHistogram get()
Description copied from interface:HistogramStatewill create an empty histogram if none exists- Specified by:
getin interfaceHistogramState- Returns:
- histogram based on the type of state (single, grouped). Note that empty histograms will serialize to null as required
-
deserialize
public void deserialize(Block block, int expectedSize)
- Specified by:
deserializein interfaceHistogramState
-
addMemoryUsage
public void addMemoryUsage(long memory)
- Specified by:
addMemoryUsagein interfaceHistogramState
-
getEstimatedSize
public long getEstimatedSize()
- Specified by:
getEstimatedSizein interfaceAccumulatorState
-
-