Package dev.vortex.jni
Class NativeArrayMethods
java.lang.Object
dev.vortex.jni.NativeArrayMethods
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
dropArrowArray
(long arrowArrayPtr) static void
dropArrowSchema
(long arrowSchemaPtr) static void
exportToArrow
(long pointer, long[] schemaPointer, long[] arrayPointer) static void
free
(long pointer) static BigDecimal
getBigDecimal
(long pointer, int index) static byte[]
getBinary
(long pointer, int index) static boolean
getBool
(long pointer, int index) static byte
getByte
(long pointer, int index) static long
getDataType
(long pointer) static double
getDouble
(long pointer, int index) static long
getField
(long pointer, int index) static float
getFloat
(long pointer, int index) static int
getInt
(long pointer, int index) static long
getLen
(long pointer) static long
getLong
(long pointer, int index) static boolean
getNull
(long pointer, int index) static int
getNullCount
(long pointer) static short
getShort
(long pointer, int index) static String
getUTF8
(long pointer, int index) static void
getUTF8_ptr_len
(long pointer, int index, long[] outPtr, int[] outLen) Raw-pointer variant ofgetUTF8(long, int)
that accepts an array to hold a pointer and an output length.static long
nbytes
(long pointer) static long
slice
(long pointer, int start, int stop)
-
Method Details
-
nbytes
public static long nbytes(long pointer) -
exportToArrow
public static void exportToArrow(long pointer, long[] schemaPointer, long[] arrayPointer) -
dropArrowSchema
public static void dropArrowSchema(long arrowSchemaPtr) -
dropArrowArray
public static void dropArrowArray(long arrowArrayPtr) -
free
public static void free(long pointer) -
getLen
public static long getLen(long pointer) -
getDataType
public static long getDataType(long pointer) -
getField
public static long getField(long pointer, int index) -
slice
public static long slice(long pointer, int start, int stop) -
getNull
public static boolean getNull(long pointer, int index) -
getNullCount
public static int getNullCount(long pointer) -
getByte
public static byte getByte(long pointer, int index) -
getShort
public static short getShort(long pointer, int index) -
getInt
public static int getInt(long pointer, int index) -
getLong
public static long getLong(long pointer, int index) -
getBool
public static boolean getBool(long pointer, int index) -
getFloat
public static float getFloat(long pointer, int index) -
getDouble
public static double getDouble(long pointer, int index) -
getBigDecimal
-
getUTF8
-
getUTF8_ptr_len
public static void getUTF8_ptr_len(long pointer, int index, long[] outPtr, int[] outLen) Raw-pointer variant ofgetUTF8(long, int)
that accepts an array to hold a pointer and an output length.For Java query engines that use Unsafe to manipulate native memory, this allows working with the string inside of the JVM without copying it into Java heap memory.
-
getBinary
public static byte[] getBinary(long pointer, int index)
-