Class MinMaxNStateFactory.GroupedMinMaxNState

java.lang.Object
io.trino.operator.aggregation.minmaxn.MinMaxNStateFactory.GroupedMinMaxNState
All Implemented Interfaces:
MinMaxNState, AccumulatorState, GroupedAccumulatorState
Enclosing class:
MinMaxNStateFactory

public abstract static class MinMaxNStateFactory.GroupedMinMaxNState extends Object implements GroupedAccumulatorState
  • Constructor Details

  • Method Details

    • setGroupId

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

      public final void ensureCapacity(long 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: MinMaxNState
      Initialize the state if not already initialized. Only the first call is processed and all subsequent calls are ignored.
      Specified by:
      initialize in interface MinMaxNState
    • add

      public final void add(ValueBlock block, int position)
      Description copied from interface: MinMaxNState
      Adds the value to this state.
      Specified by:
      add in interface MinMaxNState
    • writeAllSorted

      public final void writeAllSorted(BlockBuilder out)
      Description copied from interface: MinMaxNState
      Writes all values to the supplied block builder as an array entry.
      Specified by:
      writeAllSorted in interface MinMaxNState
    • merge

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

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