Package io.deephaven.engine.rowset.impl
Class RowSetUtils
java.lang.Object
io.deephaven.engine.rowset.impl.RowSetUtils
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static interface
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic LogOutput
append
(LogOutput logOutput, RowSet.RangeIterator it) static void
fillKeyIndicesChunk
(RowSet index, WritableLongChunk<? super OrderedRowKeys> chunkToFill) static void
fillKeyRangesChunk
(RowSet index, WritableLongChunk<OrderedRowKeyRanges> chunkToFill) static void
forAllInvertedLongRanges
(RowSet sourceRowSet, RowSet destRowSet, LongRangeConsumer lrc) This is equivalent to `sourceRowSet.invert(destRowSet).forAllRowKeyRanges(lrc)`, but requires O(1) space.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.
-
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
-
rangeSearch
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 RowSetdestRowSet
- RowSet values to look for within sourceRowSetlrc
- consumer to handle each inverted range that is encountered
-