Class CopyingPermutedBlinkFirstOrLastChunkedOperator

java.lang.Object
io.deephaven.engine.table.impl.by.BaseBlinkFirstOrLastChunkedOperator
io.deephaven.engine.table.impl.by.CopyingPermutedBlinkFirstOrLastChunkedOperator
All Implemented Interfaces:
IterativeChunkedAggregationOperator
Direct Known Subclasses:
BlinkLastChunkedOperator, ByteBlinkSortedFirstOrLastChunkedOperator, CharBlinkSortedFirstOrLastChunkedOperator, DoubleBlinkSortedFirstOrLastChunkedOperator, FloatBlinkSortedFirstOrLastChunkedOperator, IntBlinkSortedFirstOrLastChunkedOperator, LongBlinkSortedFirstOrLastChunkedOperator, ObjectBlinkSortedFirstOrLastChunkedOperator, ShortBlinkSortedFirstOrLastChunkedOperator

public abstract class CopyingPermutedBlinkFirstOrLastChunkedOperator extends BaseBlinkFirstOrLastChunkedOperator
Base-class for stream first/last-by chunked operators that need to copy data from source columns to result columns with a permutation on the redirected indices.
  • Field Details

  • Constructor Details

    • CopyingPermutedBlinkFirstOrLastChunkedOperator

      public CopyingPermutedBlinkFirstOrLastChunkedOperator(@NotNull @NotNull MatchPair[] resultPairs, @NotNull @NotNull Table blinkTable)
  • Method Details

    • 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
    • startTrackingPrevValues

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

      protected void copyStreamToResult(@NotNull @NotNull RowSequence destinations)

      For each destination slot, map to the latest source row key and copy source values to destination slots for all result columns.

      This implementation proceeds chunk-wise in the following manner:

      1. Get a chunk of destination slots
      2. Fill a chunk of source indices
      3. Sort the chunk of source indices
      4. For each input column: get a chunk of input values, permute it into a chunk of destination values, and then fill the output column
      Parameters:
      destinations - The changed (added or modified) destination slots as an RowSequence
    • startRecording

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

      public final void finishRecording()