Class IncrementalChunkedOperatorAggregationStateManagerOpenAddressedBase
java.lang.Object
io.deephaven.engine.table.impl.by.OperatorAggregationStateManagerOpenAddressedAlternateBase
io.deephaven.engine.table.impl.by.IncrementalChunkedOperatorAggregationStateManagerOpenAddressedBase
- All Implemented Interfaces:
IncrementalOperatorAggregationStateManager
public abstract class IncrementalChunkedOperatorAggregationStateManagerOpenAddressedBase
extends OperatorAggregationStateManagerOpenAddressedAlternateBase
implements IncrementalOperatorAggregationStateManager
-
Nested Class Summary
Nested classes/interfaces inherited from class io.deephaven.engine.table.impl.by.OperatorAggregationStateManagerOpenAddressedAlternateBase
OperatorAggregationStateManagerOpenAddressedAlternateBase.BuildContext, OperatorAggregationStateManagerOpenAddressedAlternateBase.BuildHandler, OperatorAggregationStateManagerOpenAddressedAlternateBase.ProbeHandler
-
Field Summary
Modifier and TypeFieldDescriptionprotected ImmutableIntArraySource
The state value for the bucket, parallel to alternateKeySources (the state is an output row key for the aggregation).protected AlternatingColumnSource[]
Output alternating column sources.protected static final int
Our state value used when nothing is there.protected int
The mask for insertion into the main table (this tells our alternating column sources which of the two sources to access for a given key).protected ImmutableIntArraySource
The state value for the bucket, parallel to mainKeySources (the state is an output row key for the aggregation).protected org.apache.commons.lang3.mutable.MutableInt
State variables that exist as part of the update.protected WritableIntChunk<RowKeys>
protected final IntegerArraySource
Used as a row redirection for the output key sources, updated using the mainInsertMask to identify the main vs.static final int
Fields inherited from class io.deephaven.engine.table.impl.by.OperatorAggregationStateManagerOpenAddressedAlternateBase
alternateKeySources, alternateTableSize, CHUNK_SIZE, fullRehash, mainKeySources, numEntries, rehashPointer, tableSize
-
Constructor Summary
ModifierConstructorDescriptionprotected
IncrementalChunkedOperatorAggregationStateManagerOpenAddressedBase
(ColumnSource<?>[] tableKeySources, int tableSize, double maximumLoadFactor) -
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
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
protected void
void
onNextChunk
(int size) protected abstract void
probe
(RowSequence chunkOk, Chunk[] sourceKeyChunks) 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.OperatorAggregationStateManagerOpenAddressedAlternateBase
build, buildTable, doRehash, findPositionForKey, hashToTableLocation, hashToTableLocationAlternate, makeProbeContext, maxTableSize, migrateFront, probeTable, rehashInternalFull, rehashInternalPartial, 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_POSITIONOur state value used when nothing is there.- See Also:
-
mainOutputPosition
The state value for the bucket, parallel to mainKeySources (the state is an output row key for the aggregation). -
alternateOutputPosition
The state value for the bucket, parallel to alternateKeySources (the state is an output row key for the aggregation). -
outputPositionToHashSlot
Used as a row redirection for the output key sources, updated using the mainInsertMask to identify the main vs. alternate values. -
nextOutputPosition
protected org.apache.commons.lang3.mutable.MutableInt nextOutputPositionState variables that exist as part of the update. -
outputPositions
-
alternatingColumnSources
Output alternating column sources. -
mainInsertMask
protected int mainInsertMaskThe mask for insertion into the main table (this tells our alternating column sources which of the two sources to access for a given key). -
UNKNOWN_ROW
static final int UNKNOWN_ROW- See Also:
-
-
Constructor Details
-
IncrementalChunkedOperatorAggregationStateManagerOpenAddressedBase
protected IncrementalChunkedOperatorAggregationStateManagerOpenAddressedBase(ColumnSource<?>[] tableKeySources, int tableSize, double maximumLoadFactor)
-
-
Method Details
-
newAlternate
protected void newAlternate()- Specified by:
newAlternate
in classOperatorAggregationStateManagerOpenAddressedAlternateBase
-
clearAlternate
protected void clearAlternate()- Overrides:
clearAlternate
in classOperatorAggregationStateManagerOpenAddressedAlternateBase
-
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) -
onNextChunk
public void onNextChunk(int size) - Specified by:
onNextChunk
in classOperatorAggregationStateManagerOpenAddressedAlternateBase
-
getKeyHashTableSources
-
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
-
probe
-
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
-
startTrackingPrevValues
public void startTrackingPrevValues()- Specified by:
startTrackingPrevValues
in interfaceIncrementalOperatorAggregationStateManager
-
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
-