Class ObjectBlinkSortedFirstOrLastChunkedOperator
java.lang.Object
io.deephaven.engine.table.impl.by.BaseBlinkFirstOrLastChunkedOperator
io.deephaven.engine.table.impl.by.CopyingPermutedBlinkFirstOrLastChunkedOperator
io.deephaven.engine.table.impl.by.ObjectBlinkSortedFirstOrLastChunkedOperator
- All Implemented Interfaces:
IterativeChunkedAggregationOperator
public class ObjectBlinkSortedFirstOrLastChunkedOperator
extends CopyingPermutedBlinkFirstOrLastChunkedOperator
Chunked aggregation operator for sorted first/last-by using a Object sort-column on blink tables.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.deephaven.engine.table.impl.by.IterativeChunkedAggregationOperator
IterativeChunkedAggregationOperator.BucketedContext, IterativeChunkedAggregationOperator.SingletonContext
-
Field Summary
Fields inherited from class io.deephaven.engine.table.impl.by.CopyingPermutedBlinkFirstOrLastChunkedOperator
permuteKernels
Fields inherited from class io.deephaven.engine.table.impl.by.BaseBlinkFirstOrLastChunkedOperator
COPY_CHUNK_SIZE, inputColumns, numResultColumns, outputColumns, redirections
Fields inherited from interface io.deephaven.engine.table.impl.by.IterativeChunkedAggregationOperator
ZERO_LENGTH_ITERATIVE_CHUNKED_AGGREGATION_OPERATOR_ARRAY
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addChunk
(IterativeChunkedAggregationOperator.BucketedContext bucketedContext, @NotNull Chunk<? extends Values> values, @NotNull LongChunk<? extends RowKeys> inputRowKeys, @NotNull IntChunk<RowKeys> destinations, @NotNull IntChunk<ChunkPositions> startPositions, @NotNull IntChunk<ChunkLengths> length, @NotNull WritableBooleanChunk<Values> stateModified) Aggregate a chunk of data into the result columns.boolean
addChunk
(IterativeChunkedAggregationOperator.SingletonContext singletonContext, int chunkSize, @NotNull Chunk<? extends Values> values, @NotNull LongChunk<? extends RowKeys> inputRowKeys, long destination) Aggregate a chunk of data into the result columns.void
ensureCapacity
(long tableSize) Ensure that this operator can handle destinations up to tableSize - 1.final void
void
propagateInitialState
(@NotNull QueryTable resultTable, int startingDestinationsCount) Perform any internal state keeping needed for destinations that were added during initialization.void
propagateUpdates
(@NotNull TableUpdate downstream, @NotNull RowSet newDestinations) Perform any internal state keeping needed for destinations that were added (went from 0 keys to > 0), removed (went from > 0 keys to 0), or modified (keys added or removed, or keys modified) by this iteration.void
resetForStep
(@NotNull TableUpdate upstream, int startingDestinationsCount) Reset any per-step internal state.final void
startRecording
(LongConsumer reincarnatedDestinationCallback, LongConsumer emptiedDestinationCallback) Methods inherited from class io.deephaven.engine.table.impl.by.CopyingPermutedBlinkFirstOrLastChunkedOperator
copyStreamToResult, startTrackingPrevValues
Methods inherited from class io.deephaven.engine.table.impl.by.BaseBlinkFirstOrLastChunkedOperator
getResultColumns, modifyChunk, modifyChunk, modifyRowKeys, modifyRowKeys, removeChunk, removeChunk, requiresRowKeys, shiftChunk, shiftChunk
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.IterativeChunkedAggregationOperator
addRowSet, initializeRefreshing, makeBucketedContext, makeSingletonContext, propagateFailure, requiresRunFinds, unchunkedRowSet
-
Method Details
-
ensureCapacity
public void ensureCapacity(long tableSize) Description copied from interface:IterativeChunkedAggregationOperator
Ensure that this operator can handle destinations up to tableSize - 1.- Specified by:
ensureCapacity
in interfaceIterativeChunkedAggregationOperator
- Overrides:
ensureCapacity
in classCopyingPermutedBlinkFirstOrLastChunkedOperator
- Parameters:
tableSize
- the new size of the table
-
resetForStep
Description copied from interface:IterativeChunkedAggregationOperator
Reset any per-step internal state. Note that the arguments to this method should not be mutated in any way.- Specified by:
resetForStep
in interfaceIterativeChunkedAggregationOperator
- Overrides:
resetForStep
in classBaseBlinkFirstOrLastChunkedOperator
- Parameters:
upstream
- The upstream ShiftAwareListener.UpdatestartingDestinationsCount
- The number of used destinations at the beginning of this step
-
addChunk
public void addChunk(IterativeChunkedAggregationOperator.BucketedContext bucketedContext, @NotNull @NotNull Chunk<? extends Values> values, @NotNull @NotNull LongChunk<? extends RowKeys> inputRowKeys, @NotNull @NotNull IntChunk<RowKeys> destinations, @NotNull @NotNull IntChunk<ChunkPositions> startPositions, @NotNull @NotNull IntChunk<ChunkLengths> length, @NotNull @NotNull WritableBooleanChunk<Values> stateModified) Description copied from interface:IterativeChunkedAggregationOperator
Aggregate a chunk of data into the result columns.- Parameters:
bucketedContext
- the operator-specific contextvalues
- a chunk of values to aggregateinputRowKeys
- the input row keys, in post-shift spacedestinations
- the destinations in resultColumn to aggregate into, parallel with startPositions and lengthstartPositions
- the starting positions in the chunk for each destinationlength
- the number of values in the chunk for each destinationstateModified
- a boolean output array, parallel to destinations, which is set to true if the corresponding destination has been modified
-
addChunk
public boolean addChunk(IterativeChunkedAggregationOperator.SingletonContext singletonContext, int chunkSize, @NotNull @NotNull Chunk<? extends Values> values, @NotNull @NotNull LongChunk<? extends RowKeys> inputRowKeys, long destination) Description copied from interface:IterativeChunkedAggregationOperator
Aggregate a chunk of data into the result columns.- Parameters:
singletonContext
- the operator-specific contextchunkSize
- the size of the additionvalues
- the values to aggregateinputRowKeys
- the input row keys, in post-shift spacedestination
- the destination in the result columns- Returns:
- true if the state was modified, false otherwise
-
propagateInitialState
public void propagateInitialState(@NotNull @NotNull QueryTable resultTable, int startingDestinationsCount) Description copied from interface:IterativeChunkedAggregationOperator
Perform any internal state keeping needed for destinations that were added during initialization.- Parameters:
resultTable
- The resultQueryTable
after initializationstartingDestinationsCount
- The number of used destinations at the beginning of this step
-
propagateUpdates
public void propagateUpdates(@NotNull @NotNull TableUpdate downstream, @NotNull @NotNull RowSet newDestinations) Description copied from interface:IterativeChunkedAggregationOperator
Perform any internal state keeping needed for destinations that were added (went from 0 keys to > 0), removed (went from > 0 keys to 0), or modified (keys added or removed, or keys modified) by this iteration. Note that the arguments to this method should not be mutated in any way.- Parameters:
downstream
- The downstream TableUpdate (which does not have itsModifiedColumnSet
finalized yet)newDestinations
- New destinations added on this update
-
startRecording
public final void startRecording(LongConsumer reincarnatedDestinationCallback, LongConsumer emptiedDestinationCallback) -
finishRecording
public final void finishRecording()
-