Class RowSetUtils

java.lang.Object
io.deephaven.engine.rowset.impl.RowSetUtils

public class RowSetUtils extends Object
  • Constructor Details

    • RowSetUtils

      public RowSetUtils()
  • Method Details

    • fillKeyIndicesChunk

      public static void fillKeyIndicesChunk(RowSet index, WritableLongChunk<? super OrderedRowKeys> chunkToFill)
    • fillKeyRangesChunk

      public static void fillKeyRangesChunk(RowSet index, WritableLongChunk<OrderedRowKeyRanges> chunkToFill)
    • append

      public static LogOutput append(LogOutput logOutput, RowSet.RangeIterator it)
    • rangeSearch

      public static long rangeSearch(long begin, long end, RowSetUtils.Comparator comp)
      Look for the biggest value of i that satisfies begin <= i <= end and comp.directionToTargetFrom(i) > 0, or some value that satisfies comp.directionToTargetFrom(i) == 0.
      Parameters:
      begin - The beginning of the range (inclusive)
      end - The end of the range (inclusive)
      comp - a Comparator.
      Returns:
      the last position i inside the provided range that satisfies comp.directionToTargetFrom(i) > 0, or some position that satisfies comp.directionToTargetFrom(i) == 0.
    • forAllInvertedLongRanges

      public static void forAllInvertedLongRanges(RowSet sourceRowSet, RowSet destRowSet, LongRangeConsumer lrc)
      This is equivalent to `sourceRowSet.invert(destRowSet).forAllRowKeyRanges(lrc)`, but requires O(1) space. Note that coalescing adjacent position-space runs enables callers to make minimal System.arraycopy calls.
      Parameters:
      sourceRowSet - RowSet to find the destRowSet keys in - ranges in the callback will be on this RowSet
      destRowSet - RowSet values to look for within sourceRowSet
      lrc - consumer to handle each inverted range that is encountered