Class BlinkFirstChunkedOperator

java.lang.Object
io.deephaven.engine.table.impl.by.BaseBlinkFirstOrLastChunkedOperator
io.deephaven.engine.table.impl.by.BlinkFirstChunkedOperator
All Implemented Interfaces:
IterativeChunkedAggregationOperator

public class BlinkFirstChunkedOperator extends BaseBlinkFirstOrLastChunkedOperator
A firstBy aggregation operator for blink tables.
See Also:
  • Method Details

    • unchunkedRowSet

      public final boolean unchunkedRowSet()
      Description copied from interface: IterativeChunkedAggregationOperator
      Whether the operator can deal with an unchunked RowSet more efficiently than a chunked RowSet.
      Returns:
      true if the operator can deal with unchunked RowSets, false otherwise
    • startTrackingPrevValues

      public final void startTrackingPrevValues()
      Description copied from interface: IterativeChunkedAggregationOperator
      Called after initialization; when the operator's result columns must have previous tracking enabled.
    • ensureCapacity

      public void ensureCapacity(long tableSize)
      Description copied from interface: IterativeChunkedAggregationOperator
      Ensure that this operator can handle destinations up to tableSize - 1.
      Parameters:
      tableSize - the new size of the table
    • addChunk

      public void addChunk(IterativeChunkedAggregationOperator.BucketedContext bucketedContext, Chunk<? extends Values> values, @NotNull @NotNull LongChunk<? extends RowKeys> inputRowKeys, @NotNull @NotNull IntChunk<RowKeys> destinations, @NotNull @NotNull IntChunk<ChunkPositions> startPositions, 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 context
      values - a chunk of values to aggregate
      inputRowKeys - the input row keys, in post-shift space
      destinations - the destinations in resultColumn to aggregate into, parallel with startPositions and length
      startPositions - the starting positions in the chunk for each destination
      length - the number of values in the chunk for each destination
      stateModified - 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 context, int chunkSize, 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:
      context - the operator-specific context
      chunkSize - the size of the addition
      values - the values to aggregate
      inputRowKeys - the input row keys, in post-shift space
      destination - the destination in the result columns
      Returns:
      true if the state was modified, false otherwise
    • addRowSet

      public boolean addRowSet(IterativeChunkedAggregationOperator.SingletonContext context, @NotNull @NotNull RowSet rowSet, long destination)
    • 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 result QueryTable after initialization
      startingDestinationsCount - 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 its ModifiedColumnSet finalized yet)
      newDestinations - New destinations added on this update
    • makeBucketedContext

      public IterativeChunkedAggregationOperator.BucketedContext makeBucketedContext(int size)
      Description copied from interface: IterativeChunkedAggregationOperator
      Make a IterativeChunkedAggregationOperator.BucketedContext suitable for this operator if necessary.
      Parameters:
      size - The maximum size of input chunks that will be used with the result context
      Returns:
      A new IterativeChunkedAggregationOperator.BucketedContext, or null if none is necessary
    • startRecording

      public final void startRecording(LongConsumer reincarnatedDestinationCallback, LongConsumer emptiedDestinationCallback)
    • finishRecording

      public final void finishRecording()