Class ByteReverseDupCompactKernel
java.lang.Object
com.illumon.iris.db.v2.join.dupcompact.ByteReverseDupCompactKernel
- All Implemented Interfaces:
DupCompactKernel
,Context
,SafeCloseable
,AutoCloseable
-
Method Summary
Modifier and TypeMethodDescriptionint
compactDuplicates
(WritableChunk<? extends Attributes.Any> chunkToCompact, WritableLongChunk<Attributes.KeyIndices> keyIndices) Remove all adjacent values from chunkToCompact, except the last value in any adjacent run.
-
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 interfaceDupCompactKernel
- Parameters:
chunkToCompact
- the values to remove duplicates fromkeyIndices
- the key indices parallel to chunkToCompact- Returns:
- the first position of an out-of-order element, or -1 if all elements are in order
-