Package com.illumon.iris.db.v2.sort
Interface LongSortKernel<ATTR extends Attributes.Any,KEY_INDICES extends Attributes.Keys>
- All Superinterfaces:
 AutoCloseable,Context,SafeCloseable
- All Known Implementing Classes:
 ByteLongTimsortDescendingKernel.ByteLongSortKernelContext,ByteLongTimsortKernel.ByteLongSortKernelContext,CharLongTimsortKernel.CharLongSortKernelContext,DoubleLongTimsortDescendingKernel.DoubleLongSortKernelContext,DoubleLongTimsortKernel.DoubleLongSortKernelContext,FloatLongTimsortDescendingKernel.FloatLongSortKernelContext,FloatLongTimsortKernel.FloatLongSortKernelContext,IntLongTimsortDescendingKernel.IntLongSortKernelContext,IntLongTimsortKernel.IntLongSortKernelContext,IntTimsortKernel.IntLongSortKernelContext,LongLongTimsortDescendingKernel.LongLongSortKernelContext,LongLongTimsortKernel.LongLongSortKernelContext,NullAwareCharLongTimsortDescendingKernel.CharLongSortKernelContext,NullAwareCharLongTimsortKernel.CharLongSortKernelContext,ObjectLongTimsortDescendingKernel.ObjectLongSortKernelContext,ObjectLongTimsortKernel.ObjectLongSortKernelContext,ShortLongTimsortDescendingKernel.ShortLongSortKernelContext,ShortLongTimsortKernel.ShortLongSortKernelContext
public interface LongSortKernel<ATTR extends Attributes.Any,KEY_INDICES extends Attributes.Keys> extends Context
The SortKernel sorts a chunk of primitive value together with a parallel LongChunk of KeyIndices.
- 
Method Summary
Modifier and Type Method Description static <ATTR extends Attributes.Any, KEY_INDICES extends Attributes.Keys>
LongSortKernel<ATTR,KEY_INDICES>makeContext(ChunkType chunkType, SortingOrder order, int size, boolean preserveValues)Creates a SortKernel for the given chunkType.voidsort(WritableLongChunk<KEY_INDICES> indexKeys, WritableChunk<ATTR> valuesToSort)Sort the values in valuesToSort permuting the indexKeys chunk in the same way.voidsort(WritableLongChunk<KEY_INDICES> indexKeys, WritableChunk<ATTR> valuesToSort, IntChunk<? extends Attributes.ChunkPositions> offsetsIn, IntChunk<? extends Attributes.ChunkLengths> lengthsIn)Sort the values in valuesToSort permuting the indexKeys chunk in the same way. 
- 
Method Details
- 
makeContext
static <ATTR extends Attributes.Any, KEY_INDICES extends Attributes.Keys> LongSortKernel<ATTR,KEY_INDICES> makeContext(ChunkType chunkType, SortingOrder order, int size, boolean preserveValues)Creates a SortKernel for the given chunkType.- Parameters:
 chunkType- the type of chunk we are sortingorder- whether we should sort in an ascending or descending directionsize- how many values we will be sortingpreserveValues- if the output chunk of our sort should contain the values in sorted order; otherwise the kernel need only permute the input indices into sorted order- Returns:
 - a SortKernel suitable for the given type, order, and size
 
 - 
sort
Sort the values in valuesToSort permuting the indexKeys chunk in the same way. - 
sort
void sort(WritableLongChunk<KEY_INDICES> indexKeys, WritableChunk<ATTR> valuesToSort, IntChunk<? extends Attributes.ChunkPositions> offsetsIn, IntChunk<? extends Attributes.ChunkLengths> lengthsIn)Sort the values in valuesToSort permuting the indexKeys chunk in the same way. The offsetsIn chunk is contains the offset of runs to sort in indexKeys; and the lengthsIn contains the length of the runs. This allows the kernel to be used for a secondary column sort, chaining it together with smaller runs sorted on each pass. 
 -