Interface DupCompactKernel
- All Known Implementing Classes:
ByteDupCompactKernel
,ByteReverseDupCompactKernel
,CharDupCompactKernel
,CharReverseDupCompactKernel
,DoubleDupCompactKernel
,DoubleReverseDupCompactKernel
,FloatDupCompactKernel
,FloatReverseDupCompactKernel
,IntDupCompactKernel
,IntReverseDupCompactKernel
,LongDupCompactKernel
,LongReverseDupCompactKernel
,NullAwareCharDupCompactKernel
,NullAwareCharReverseDupCompactKernel
,ObjectDupCompactKernel
,ObjectReverseDupCompactKernel
,ShortDupCompactKernel
,ShortReverseDupCompactKernel
public interface DupCompactKernel
-
Method Summary
Modifier and TypeMethodDescriptionint
compactDuplicates
(@NotNull WritableChunk<? extends Any> chunkToCompact, @NotNull WritableLongChunk<RowKeys> rowKeys) Remove all adjacent values fromchunkToCompact
, except the last value in any adjacent run.int
compactDuplicatesPreferFirst
(@NotNull WritableChunk<? extends Any> chunkToCompact, @NotNull WritableIntChunk<ChunkPositions> chunkPositions) Remove all adjacent values fromchunkToCompact
, except the first value in any adjacent run.static DupCompactKernel
makeDupCompactDeephavenOrdering
(@NotNull ChunkType chunkType, boolean reverse) static DupCompactKernel
makeDupCompactNaturalOrdering
(@NotNull ChunkType chunkType, boolean reverse)
-
Method Details
-
makeDupCompactDeephavenOrdering
static DupCompactKernel makeDupCompactDeephavenOrdering(@NotNull @NotNull ChunkType chunkType, boolean reverse) -
makeDupCompactNaturalOrdering
static DupCompactKernel makeDupCompactNaturalOrdering(@NotNull @NotNull ChunkType chunkType, boolean reverse) -
compactDuplicates
int compactDuplicates(@NotNull @NotNull WritableChunk<? extends Any> chunkToCompact, @NotNull @NotNull WritableLongChunk<RowKeys> rowKeys) Remove all adjacent values fromchunkToCompact
, except the last value in any adjacent run. TherowKeys
are parallel to thechunkToCompact
. When a value is removed fromchunkToCompact
, it is also removed fromrowKeys
.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.- Parameters:
chunkToCompact
- The values to remove duplicates fromrowKeys
- The row keys parallel tochunkToCompact
- Returns:
- The first position of an out-of-order element, or -1 if all elements are in order
-
compactDuplicatesPreferFirst
int compactDuplicatesPreferFirst(@NotNull @NotNull WritableChunk<? extends Any> chunkToCompact, @NotNull @NotNull WritableIntChunk<ChunkPositions> chunkPositions) Remove all adjacent values fromchunkToCompact
, except the first value in any adjacent run. ThechunkPositions
are parallel to thechunkToCompact
. When a value is removed fromchunkToCompact
, it is also removed fromchunkPositions
.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.- Parameters:
chunkToCompact
- The values to remove duplicates fromchunkPositions
- The chunk positions parallel tochunkToCompact
- Returns:
- The first position of an out-of-order element, or -1 if all elements are in order
-