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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidadd(ValueBlock block, int position) Adds the value to this state.final voidensureCapacity(int 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(int groupId) final voidWrites 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
-
-
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: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
-
writeAllSorted
Description copied from interface:MinMaxNStateWrites all values to the supplied block builder as an array entry.- Specified by:
writeAllSortedin 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
-
serialize
Description copied from interface:MinMaxNStateWrite this state to the specified block builder.- Specified by:
serializein interfaceMinMaxNState
-