Class ByteReverseDupCompactKernel

java.lang.Object
io.deephaven.engine.table.impl.join.dupcompact.ByteReverseDupCompactKernel
All Implemented Interfaces:
DupCompactKernel

public class ByteReverseDupCompactKernel extends Object implements DupCompactKernel
  • Method Details

    • compactDuplicates

      public int compactDuplicates(@NotNull @NotNull WritableChunk<? extends Any> chunkToCompact, @NotNull @NotNull WritableLongChunk<RowKeys> rowKeys)
      Description copied from interface: DupCompactKernel
      Remove all adjacent values from chunkToCompact, except the last value in any adjacent run. The rowKeys are parallel to the chunkToCompact. When a value is removed from chunkToCompact, it is also removed from rowKeys.

      Additionally, verifies that the elements in chunkToCompact are properly ordered. Upon encountering an out-of-order element, the operation stops compacting and returns the position of the out-of-order element.

      Specified by:
      compactDuplicates in interface DupCompactKernel
      Parameters:
      chunkToCompact - The values to remove duplicates from
      rowKeys - The row keys parallel to chunkToCompact
      Returns:
      The first position of an out-of-order element, or -1 if all elements are in order
    • compactDuplicatesPreferFirst

      public int compactDuplicatesPreferFirst(@NotNull @NotNull WritableChunk<? extends Any> chunkToCompact, @NotNull @NotNull WritableIntChunk<ChunkPositions> chunkPositions)
      Description copied from interface: DupCompactKernel
      Remove all adjacent values from chunkToCompact, except the first value in any adjacent run. The chunkPositions are parallel to the chunkToCompact. When a value is removed from chunkToCompact, it is also removed from chunkPositions.

      Additionally, verifies that the elements in chunkToCompact are properly ordered. Upon encountering an out-of-order element, the operation stops compacting and returns the position of the out-of-order element.

      Specified by:
      compactDuplicatesPreferFirst in interface DupCompactKernel
      Parameters:
      chunkToCompact - The values to remove duplicates from
      chunkPositions - The chunk positions parallel to chunkToCompact
      Returns:
      The first position of an out-of-order element, or -1 if all elements are in order