Class ObjectCopyKernel
java.lang.Object
com.illumon.iris.db.v2.utils.copy.ObjectCopyKernel
- All Implemented Interfaces:
CopyKernel
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.illumon.iris.db.v2.utils.copy.CopyKernel
CopyKernel.Utils -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescription<T extends Attributes.Any>
voidconditionalCopy(WritableChunk<T> output, Object baseInput, Object overInput, long[] useOverInput, int srcOffset, int dstOffset, int length) Copy values from baseInput / overInput into output.static <T extends Attributes.Any>
voidconditionalCopy(WritableObjectChunk<Object, T> output, Object[] baseInput, Object[] overInput, long[] useOverInput, int srcOffset, int dstOffset, int length) Copy values from baseInput / overInput into output.
-
Field Details
-
INSTANCE
-
-
Method Details
-
conditionalCopy
public static <T extends Attributes.Any> void conditionalCopy(WritableObjectChunk<Object, T> output, Object[] baseInput, Object[] overInput, long[] useOverInput, int srcOffset, int dstOffset, int length) Copy values from baseInput / overInput into output.Pseudo-implementation: output[i] = useOverInput.forBit(i) ? overInput[i] : baseInput[i];
Note that useOverInput should cover the same data range as baseInput such that
useOverInput.length == (overInput.length + 63) / 64is true.- Parameters:
output- the output chunkbaseInput- the input array to use when bit in useOverInput is zero (array)overInput- the input array to use when bit in useOverInput is one (array)useOverInput- the bitset array to indicate whether to use baseInput or overInput for each elementsrcOffset- the offset in baseInput/overInputdstOffset- the offset in outputlength- the number of elements to copy
-
conditionalCopy
public <T extends Attributes.Any> void conditionalCopy(WritableChunk<T> output, Object baseInput, Object overInput, long[] useOverInput, int srcOffset, int dstOffset, int length) Description copied from interface:CopyKernelCopy values from baseInput / overInput into output.Pseudo-implementation: output[i] = useOverInput.forBit(i) ? overInput[i] : baseInput[i];
Note that useOverInput should cover the same data range as baseInput such that
useOverInput.length == (overInput.length + 63) / 64is true.- Specified by:
conditionalCopyin interfaceCopyKernel- Parameters:
output- the output chunkbaseInput- the input array to use when bit in useOverInput is zero (array)overInput- the input array to use when bit in useOverInput is one (array)useOverInput- the bitset array to indicate whether to use baseInput or overInput for each elementsrcOffset- the offset in baseInput/overInputdstOffset- the offset in outputlength- the number of elements to copy
-