Class MinMaxByNStateFactory.GroupedMinMaxByNState
java.lang.Object
io.trino.operator.aggregation.minmaxbyn.MinMaxByNStateFactory.GroupedMinMaxByNState
- All Implemented Interfaces:
MinMaxByNState,AccumulatorState,GroupedAccumulatorState
- Enclosing class:
MinMaxByNStateFactory
public abstract static class MinMaxByNStateFactory.GroupedMinMaxByNState
extends Object
implements GroupedAccumulatorState
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidadd(ValueBlock keyBlock, int keyPosition, ValueBlock valueBlock, int valuePosition) Adds the value to this state.final voidensureCapacity(int size) final longfinal voidinitialize(long n) Initialize the state if not already initialized.final voidmerge(MinMaxByNState other) Merge with the specified state.final voidpopAll(BlockBuilder out) Writes all values to the supplied block builder as an array entry.final voidserialize(BlockBuilder out) Write this state to the specified block builder.final voidsetGroupId(int groupId) 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
-
GroupedMinMaxByNState
-
-
Method Details
-
setGroupId
public final void setGroupId(int groupId) - Specified by:
setGroupIdin interfaceGroupedAccumulatorState
-
ensureCapacity
public final void ensureCapacity(int 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:MinMaxByNStateInitialize the state if not already initialized. Only the first call is processed and all subsequent calls are ignored.- Specified by:
initializein interfaceMinMaxByNState
-
add
public final void add(ValueBlock keyBlock, int keyPosition, ValueBlock valueBlock, int valuePosition) Description copied from interface:MinMaxByNStateAdds the value to this state.- Specified by:
addin interfaceMinMaxByNState
-
popAll
Description copied from interface:MinMaxByNStateWrites all values to the supplied block builder as an array entry. After this method is called, the current state will be empty.- Specified by:
popAllin interfaceMinMaxByNState
-
merge
Description copied from interface:MinMaxByNStateMerge 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 interfaceMinMaxByNState
-
serialize
Description copied from interface:MinMaxByNStateWrite this state to the specified block builder.- Specified by:
serializein interfaceMinMaxByNState
-