Class AbstractGroupCollectionAggregationState<T>

java.lang.Object
io.trino.operator.aggregation.state.AbstractGroupedAccumulatorState
io.trino.operator.aggregation.AbstractGroupCollectionAggregationState<T>
All Implemented Interfaces:
AccumulatorState, GroupedAccumulatorState
Direct Known Subclasses:
GroupArrayAggregationState, GroupedMultimapAggregationState, GroupListaggAggregationState

public abstract class AbstractGroupCollectionAggregationState<T> extends AbstractGroupedAccumulatorState
Instances of this state use a single PageBuilder for all groups.
  • Constructor Details

    • AbstractGroupCollectionAggregationState

      protected AbstractGroupCollectionAggregationState(PageBuilder pageBuilder)
  • Method Details

    • ensureCapacity

      public void ensureCapacity(long size)
    • getEstimatedSize

      public long getEstimatedSize()
    • prepareAdd

      protected final void prepareAdd()
      This method should be called before appendAtChannel(int, Block, int) to update the internal linked list, where appendAtChannel(int, Block, int) is called for each channel that has a new entry to be added.
    • appendAtChannel

      protected final void appendAtChannel(int channel, Block block, int position)
    • forEach

      public void forEach(T consumer)
    • isEmpty

      public boolean isEmpty()
    • getEntryCount

      public final int getEntryCount()
    • accept

      protected abstract boolean accept(T consumer, PageBuilder pageBuilder, int currentPosition)