Class MinMaxNStateFactory.SingleMinMaxNState
java.lang.Object
io.trino.operator.aggregation.minmaxn.MinMaxNStateFactory.SingleMinMaxNState
- All Implemented Interfaces:
MinMaxNState,AccumulatorState
- Enclosing class:
MinMaxNStateFactory
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidadd(ValueBlock block, int position) Adds the value to this state.abstract AccumulatorStatecopy()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 voidWrites all values to the supplied block builder as an array entry.
-
Constructor Details
-
SingleMinMaxNState
-
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. -
writeAllSorted
Description copied from interface:MinMaxNStateWrites all values to the supplied block builder as an array entry. -
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
-