Class MinMaxNStateFactory.SingleMinMaxNState
java.lang.Object
io.trino.operator.aggregation.minmaxn.MinMaxNStateFactory.SingleMinMaxNState
- All Implemented Interfaces:
MinMaxNState,AccumulatorState
- Enclosing class:
- MinMaxNStateFactory
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSingleMinMaxNState(LongFunction<TypedHeap> heapFactory, Function<Block, TypedHeap> 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(MinMaxNState other) Merge with the specified state.final voidserialize(BlockBuilder out) Write this state to the specified block builder.final voidwriteAll(BlockBuilder out) Writes all values to the supplied block builder as an array entry.
-
Constructor Details
-
SingleMinMaxNState
public SingleMinMaxNState(LongFunction<TypedHeap> heapFactory, Function<Block, TypedHeap> deserializer) -
SingleMinMaxNState
-
-
Method Details
-
copy
-
getEstimatedSize
public final long getEstimatedSize() -
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. -
add
Description copied from interface:MinMaxNStateAdds the value to this state. -
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. -
writeAll
Description copied from interface:MinMaxNStateWrites all values to the supplied block builder as an array entry. -
serialize
Description copied from interface:MinMaxNStateWrite this state to the specified block builder. -
deserialize
Description copied from interface:MinMaxNStateRead the state to the specified block builder.
-