Class MinMaxNStateFactory.GroupedMinMaxNState
java.lang.Object
io.trino.operator.aggregation.minmaxn.MinMaxNStateFactory.GroupedMinMaxNState
- All Implemented Interfaces:
MinMaxNState,AccumulatorState,GroupedAccumulatorState
- Enclosing class:
- MinMaxNStateFactory
public abstract static class MinMaxNStateFactory.GroupedMinMaxNState
extends Object
implements GroupedAccumulatorState
-
Constructor Summary
ConstructorsConstructorDescriptionGroupedMinMaxNState(LongFunction<TypedHeap> heapFactory, Function<Block, TypedHeap> deserializer) -
Method Summary
Modifier and TypeMethodDescriptionfinal voidAdds the value to this state.final voiddeserialize(Block rowBlock) Read the state to the specified block builder.final voidensureCapacity(long size) final longfinal voidinitialize(long n) Initialize the state if not already initialized.final voidmerge(MinMaxNState other) Merge with the specified state.final voidserialize(BlockBuilder out) Write this state to the specified block builder.final voidsetGroupId(long groupId) final voidwriteAll(BlockBuilder out) Writes all values to the supplied block builder as an array entry.Methods 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
-
GroupedMinMaxNState
public GroupedMinMaxNState(LongFunction<TypedHeap> heapFactory, Function<Block, TypedHeap> deserializer)
-
-
Method Details
-
setGroupId
public final void setGroupId(long groupId) - Specified by:
setGroupIdin interfaceGroupedAccumulatorState
-
ensureCapacity
public final void ensureCapacity(long size) - Specified by:
ensureCapacityin interfaceGroupedAccumulatorState
-
getEstimatedSize
public final long getEstimatedSize()- Specified by:
getEstimatedSizein interfaceAccumulatorState
-
initialize
public final void initialize(long n) Description copied from interface:MinMaxNStateInitialize the state if not already initialized. Only the first call is processed and all subsequent calls are ignored.- Specified by:
initializein interfaceMinMaxNState
-
add
Description copied from interface:MinMaxNStateAdds the value to this state.- Specified by:
addin interfaceMinMaxNState
-
merge
Description copied from interface:MinMaxNStateMerge with the specified state. The supplied state should not be used after this method is called, because the internal details of the state may be reused in this state.- Specified by:
mergein interfaceMinMaxNState
-
writeAll
Description copied from interface:MinMaxNStateWrites all values to the supplied block builder as an array entry.- Specified by:
writeAllin interfaceMinMaxNState
-
serialize
Description copied from interface:MinMaxNStateWrite this state to the specified block builder.- Specified by:
serializein interfaceMinMaxNState
-
deserialize
Description copied from interface:MinMaxNStateRead the state to the specified block builder.- Specified by:
deserializein interfaceMinMaxNState
-