Class IncrementalChunkedOperatorAggregationStateManagerTypedBase
java.lang.Object
io.deephaven.engine.table.impl.by.OperatorAggregationStateManagerTypedBase
io.deephaven.engine.table.impl.by.IncrementalChunkedOperatorAggregationStateManagerTypedBase
- All Implemented Interfaces:
IncrementalOperatorAggregationStateManager
public abstract class IncrementalChunkedOperatorAggregationStateManagerTypedBase
extends OperatorAggregationStateManagerTypedBase
implements IncrementalOperatorAggregationStateManager
Incremental aggregation state manager that is extended by code generated typed hashers.
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final int
protected final IntegerArraySource
protected final IntegerArraySource
static final int
Fields inherited from class io.deephaven.engine.table.impl.by.OperatorAggregationStateManagerTypedBase
CHUNK_SIZE, mainKeySources, mainOverflowLocationSource, numEntries, overflowKeySources, overflowOverflowLocationSource, tableHashPivot
-
Constructor Summary
ModifierConstructorDescriptionprotected
IncrementalChunkedOperatorAggregationStateManagerTypedBase
(ColumnSource<?>[] tableKeySources, int tableSize, double maximumLoadFactor, double targetLoadFactor) -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(@NotNull SafeCloseable bc, @NotNull RowSequence rowSequence, @NotNull ColumnSource<?>[] sources, @NotNull org.apache.commons.lang3.mutable.MutableInt nextOutputPosition, @NotNull WritableIntChunk<RowKeys> outputPositions) void
Allow our managers to do a little bit of work at the very start of the update cycle.protected void
ensureMainState
(int tableSize) protected void
ensureOverflowState
(int newCapacity) void
findModifications
(@NotNull SafeCloseable pc, @NotNull RowSequence rowSequence, @NotNull ColumnSource<?>[] sources, @NotNull WritableIntChunk<RowKeys> outputPositions) int
findPositionForKey
(Object key) Implement a lookup in order to supportAggregationRowLookup.get(Object)
.makeAggregationStateBuildContext
(ColumnSource<?>[] buildSources, long maxSize) int
void
remove
(@NotNull SafeCloseable pc, @NotNull RowSequence rowSequence, @NotNull ColumnSource<?>[] sources, @NotNull WritableIntChunk<RowKeys> outputPositions) void
Methods inherited from class io.deephaven.engine.table.impl.by.OperatorAggregationStateManagerTypedBase
allocateOverflowLocation, build, buildTable, doRehash, ensureCapacity, findPositionForKey, freeOverflowLocation, hashToTableLocation, makeProbeContext, maxTableSize, probe, probeTable, rehashBucket, rehashRequired
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.deephaven.engine.table.impl.by.IncrementalOperatorAggregationStateManager
makeProbeContext
-
Field Details
-
EMPTY_OUTPUT_POSITION
protected static final int EMPTY_OUTPUT_POSITION- See Also:
-
mainOutputPosition
-
overflowOutputPosition
-
UNKNOWN_ROW
static final int UNKNOWN_ROW- See Also:
-
-
Constructor Details
-
IncrementalChunkedOperatorAggregationStateManagerTypedBase
protected IncrementalChunkedOperatorAggregationStateManagerTypedBase(ColumnSource<?>[] tableKeySources, int tableSize, double maximumLoadFactor, double targetLoadFactor)
-
-
Method Details
-
makeAggregationStateBuildContext
-
add
public void add(@NotNull @NotNull SafeCloseable bc, @NotNull @NotNull RowSequence rowSequence, @NotNull @NotNull ColumnSource<?>[] sources, @NotNull @NotNull org.apache.commons.lang3.mutable.MutableInt nextOutputPosition, @NotNull @NotNull WritableIntChunk<RowKeys> outputPositions) -
getKeyHashTableSources
-
startTrackingPrevValues
public void startTrackingPrevValues()- Specified by:
startTrackingPrevValues
in interfaceIncrementalOperatorAggregationStateManager
-
beginUpdateCycle
public void beginUpdateCycle()Description copied from interface:IncrementalOperatorAggregationStateManager
Allow our managers to do a little bit of work at the very start of the update cycle. We have this method so that even if nothing is to be done, we rehash a little bit on each cycle to avoid always rehashing when there is other work to be done.- Specified by:
beginUpdateCycle
in interfaceIncrementalOperatorAggregationStateManager
-
remove
public void remove(@NotNull @NotNull SafeCloseable pc, @NotNull @NotNull RowSequence rowSequence, @NotNull @NotNull ColumnSource<?>[] sources, @NotNull @NotNull WritableIntChunk<RowKeys> outputPositions) - Specified by:
remove
in interfaceIncrementalOperatorAggregationStateManager
-
findModifications
public void findModifications(@NotNull @NotNull SafeCloseable pc, @NotNull @NotNull RowSequence rowSequence, @NotNull @NotNull ColumnSource<?>[] sources, @NotNull @NotNull WritableIntChunk<RowKeys> outputPositions) - Specified by:
findModifications
in interfaceIncrementalOperatorAggregationStateManager
-
ensureMainState
protected void ensureMainState(int tableSize) - Specified by:
ensureMainState
in classOperatorAggregationStateManagerTypedBase
-
ensureOverflowState
protected void ensureOverflowState(int newCapacity) - Specified by:
ensureOverflowState
in classOperatorAggregationStateManagerTypedBase
-
maxTableSize
int maxTableSize() -
findPositionForKey
Implement a lookup in order to supportAggregationRowLookup.get(Object)
.- Parameters:
key
- The opaque group-by key to find the row position/key for- Returns:
- The row position/key for
key
in the result table, or -1 if not found
-