Class SingleHistogramState
java.lang.Object
io.trino.operator.aggregation.histogram.SingleHistogramState
- All Implemented Interfaces:
HistogramState,AccumulatorState
-
Constructor Summary
ConstructorsConstructorDescriptionSingleHistogramState(Type keyType, BlockTypeOperators.BlockPositionEqual equalOperator, BlockTypeOperators.BlockPositionHashCode hashCodeOperator, int expectedEntriesCount) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddMemoryUsage(long memory) voiddeserialize(Block block, int expectedSize) get()will create an empty histogram if none existslongMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.trino.spi.function.AccumulatorState
copy
-
Constructor Details
-
SingleHistogramState
public SingleHistogramState(Type keyType, BlockTypeOperators.BlockPositionEqual equalOperator, BlockTypeOperators.BlockPositionHashCode hashCodeOperator, int expectedEntriesCount)
-
-
Method Details
-
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
- Specified by:
deserializein interfaceHistogramState
-
addMemoryUsage
public void addMemoryUsage(long memory) - Specified by:
addMemoryUsagein interfaceHistogramState
-
getEstimatedSize
public long getEstimatedSize()- Specified by:
getEstimatedSizein interfaceAccumulatorState
-