Class AbstractGroupCollectionAggregationState<T>
- java.lang.Object
-
- io.prestosql.operator.aggregation.state.AbstractGroupedAccumulatorState
-
- io.prestosql.operator.aggregation.AbstractGroupCollectionAggregationState<T>
-
- All Implemented Interfaces:
AccumulatorState
,GroupedAccumulatorState
- Direct Known Subclasses:
GroupArrayAggregationState
,GroupedMultimapAggregationState
public abstract class AbstractGroupCollectionAggregationState<T> extends AbstractGroupedAccumulatorState
Instances of this state use a single PageBuilder for all groups.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractGroupCollectionAggregationState(PageBuilder pageBuilder)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract void
accept(T consumer, PageBuilder pageBuilder, int currentPosition)
protected void
appendAtChannel(int channel, Block block, int position)
void
ensureCapacity(long size)
void
forEach(T consumer)
int
getEntryCount()
long
getEstimatedSize()
boolean
isEmpty()
protected void
prepareAdd()
This method should be called beforeappendAtChannel(int, Block, int)
to update the internal linked list, whereappendAtChannel(int, Block, int)
is called for each channel that has a new entry to be added.-
Methods inherited from class io.prestosql.operator.aggregation.state.AbstractGroupedAccumulatorState
getGroupId, setGroupId
-
-
-
-
Constructor Detail
-
AbstractGroupCollectionAggregationState
protected AbstractGroupCollectionAggregationState(PageBuilder pageBuilder)
-
-
Method Detail
-
ensureCapacity
public void ensureCapacity(long size)
-
getEstimatedSize
public long getEstimatedSize()
-
prepareAdd
protected final void prepareAdd()
This method should be called beforeappendAtChannel(int, Block, int)
to update the internal linked list, whereappendAtChannel(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 void accept(T consumer, PageBuilder pageBuilder, int currentPosition)
-
-