Class MinMaxByNStateFactory.GroupedMinMaxByNState

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

public abstract static class MinMaxByNStateFactory.GroupedMinMaxByNState extends Object implements GroupedAccumulatorState
  • Constructor Details

  • Method Details

    • setGroupId

      public final void setGroupId(int groupId)
      Specified by:
      setGroupId in interface GroupedAccumulatorState
    • ensureCapacity

      public final void ensureCapacity(int size)
      Specified by:
      ensureCapacity in interface GroupedAccumulatorState
    • getEstimatedSize

      public final long getEstimatedSize()
      Specified by:
      getEstimatedSize in interface AccumulatorState
    • 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.
      Specified by:
      initialize in interface MinMaxByNState
    • add

      public final void add(ValueBlock keyBlock, int keyPosition, ValueBlock valueBlock, int valuePosition)
      Description copied from interface: MinMaxByNState
      Adds the value to this state.
      Specified by:
      add in interface MinMaxByNState
    • 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.
      Specified by:
      popAll in interface MinMaxByNState
    • 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