Package io.trino.operator.aggregation
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 Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractGroupCollectionAggregationState(PageBuilder pageBuilder) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract booleanaccept(T consumer, PageBuilder pageBuilder, int currentPosition) protected final voidappendAtChannel(int channel, Block block, int position) voidensureCapacity(long size) voidfinal intlongbooleanisEmpty()protected final voidThis 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.trino.operator.aggregation.state.AbstractGroupedAccumulatorState
getGroupId, setGroupIdMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.trino.spi.function.AccumulatorState
copy
-
Constructor Details
-
AbstractGroupCollectionAggregationState
-
-
Method Details
-
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
-
forEach
-
isEmpty
public boolean isEmpty() -
getEntryCount
public final int getEntryCount() -
accept
-