Class MinMaxByNStateFactory.SingleMinMaxByNState

java.lang.Object
io.trino.operator.aggregation.minmaxbyn.MinMaxByNStateFactory.SingleMinMaxByNState
All Implemented Interfaces:
MinMaxByNState, AccumulatorState
Enclosing class:
MinMaxByNStateFactory

public abstract static class MinMaxByNStateFactory.SingleMinMaxByNState extends Object
  • Constructor Details

  • Method Details

    • copy

      public abstract AccumulatorState copy()
    • getEstimatedSize

      public final long getEstimatedSize()
    • initialize

      public final void initialize(long n)
      Description copied from interface: MinMaxByNState
      Initialize 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: MinMaxByNState
      Adds the value to this state.
    • popAll

      public final void popAll(BlockBuilder out)
      Description copied from interface: MinMaxByNState
      Writes all values to the supplied block builder as an array entry. After this method is called, the current state will be empty.
    • merge

      public final void merge(MinMaxByNState other)
      Description copied from interface: MinMaxByNState
      Merge 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:
      merge in interface MinMaxByNState
    • serialize

      public final void serialize(BlockBuilder out)
      Description copied from interface: MinMaxByNState
      Write this state to the specified block builder.
      Specified by:
      serialize in interface MinMaxByNState