Class MinMaxByNStateFactory.SingleMinMaxByNState
java.lang.Object
io.trino.operator.aggregation.minmaxbyn.MinMaxByNStateFactory.SingleMinMaxByNState
- All Implemented Interfaces:
MinMaxByNState,AccumulatorState
- Enclosing class:
MinMaxByNStateFactory
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSingleMinMaxByNState(LongFunction<TypedKeyValueHeap> heapFactory) -
Method Summary
Modifier and TypeMethodDescriptionfinal voidadd(ValueBlock keyBlock, int keyPosition, ValueBlock valueBlock, int valuePosition) Adds the value to this state.abstract AccumulatorStatecopy()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.
-
Constructor Details
-
SingleMinMaxByNState
-
SingleMinMaxByNState
-
-
Method Details
-
copy
-
getEstimatedSize
public final long getEstimatedSize() -
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. -
add
public final void add(ValueBlock keyBlock, int keyPosition, ValueBlock valueBlock, int valuePosition) Description copied from interface:MinMaxByNStateAdds the value to this state. -
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. -
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
-