Class ByteReverseDupCompactKernel

java.lang.Object
com.illumon.iris.db.v2.join.dupcompact.ByteReverseDupCompactKernel
All Implemented Interfaces:
DupCompactKernel, Context, SafeCloseable, AutoCloseable

public class ByteReverseDupCompactKernel extends Object implements DupCompactKernel
  • Method Details

    • compactDuplicates

      public int compactDuplicates(WritableChunk<? extends Attributes.Any> chunkToCompact, WritableLongChunk<Attributes.KeyIndices> keyIndices)
      Description copied from interface: DupCompactKernel
      Remove all adjacent values from chunkToCompact, except the last value in any adjacent run. The keyIndices are parallel to the chunkToCompact; and when a value is removed from chunkToCompact it is also removed from keyIndices Additionally, verify that the elements are properly ordered; returning the first position of an out of order element.
      Specified by:
      compactDuplicates in interface DupCompactKernel
      Parameters:
      chunkToCompact - the values to remove duplicates from
      keyIndices - the key indices parallel to chunkToCompact
      Returns:
      the first position of an out-of-order element, or -1 if all elements are in order