Class AbstractListaggAggregationState
java.lang.Object
io.trino.operator.aggregation.listagg.AbstractListaggAggregationState
- All Implemented Interfaces:
ListaggAggregationState,AccumulatorState
- Direct Known Subclasses:
GroupListaggAggregationState,SingleListaggAggregationState
public abstract class AbstractListaggAggregationState
extends Object
implements ListaggAggregationState
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final List<byte[]> The fixed chunk contains an array of records.protected byte[]protected static final intprotected static final intprotected final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(ValueBlock block, int position) longprotected final intgetRecordOffset(long index) protected final byte[]getRecords(long index) final voidinitialize(io.airlift.slice.Slice separator, boolean overflowError, io.airlift.slice.Slice overflowFiller, boolean showOverflowEntryCount) voidmerge(ListaggAggregationState other) voidserialize(RowBlockBuilder rowBlockBuilder) protected final longsize()protected final booleanwriteEntry(byte[] records, int recordOffset, io.airlift.slice.SliceOutput out, int totalEntryCount, int emittedCount) Methods 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
copyMethods inherited from interface io.trino.operator.aggregation.listagg.ListaggAggregationState
write
-
Field Details
-
RECORDS_PER_GROUP
protected static final int RECORDS_PER_GROUP- See Also:
-
RECORDS_PER_GROUP_MASK
protected static final int RECORDS_PER_GROUP_MASK- See Also:
-
recordSize
protected final int recordSize -
closedRecordGroups
The fixed chunk contains an array of records. The records are laid out as follows:- 12 byte pointer to variable width data
- 8 byte next index (only present if
hasNextIndexis true)
capacity + 1records. The extra record is used for the swap operation. -
openRecordGroup
protected byte[] openRecordGroup
-
-
Constructor Details
-
AbstractListaggAggregationState
public AbstractListaggAggregationState(int extraRecordBytes) -
AbstractListaggAggregationState
-
-
Method Details
-
getEstimatedSize
public long getEstimatedSize()- Specified by:
getEstimatedSizein interfaceAccumulatorState
-
size
protected final long size() -
initialize
public final void initialize(io.airlift.slice.Slice separator, boolean overflowError, io.airlift.slice.Slice overflowFiller, boolean showOverflowEntryCount) - Specified by:
initializein interfaceListaggAggregationState
-
add
- Specified by:
addin interfaceListaggAggregationState
-
serialize
- Specified by:
serializein interfaceListaggAggregationState
-
merge
- Specified by:
mergein interfaceListaggAggregationState
-
writeEntry
protected final boolean writeEntry(byte[] records, int recordOffset, io.airlift.slice.SliceOutput out, int totalEntryCount, int emittedCount) -
getRecords
protected final byte[] getRecords(long index) -
getRecordOffset
protected final int getRecordOffset(long index)
-