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, Function<Block, TypedKeyValueHeap> deserializer) -
Method Summary
Modifier and TypeMethodDescriptionfinal voidAdds the value to this state.abstract AccumulatorStatecopy()final voiddeserialize(Block rowBlock) Read the state to the specified block builder.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
public SingleMinMaxByNState(LongFunction<TypedKeyValueHeap> heapFactory, Function<Block, TypedKeyValueHeap> deserializer) -
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
Description copied from interface:MinMaxByNStateAdds the value to this state. -
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. -
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. -
serialize
Description copied from interface:MinMaxByNStateWrite this state to the specified block builder. -
deserialize
Description copied from interface:MinMaxByNStateRead the state to the specified block builder.
-