Package dev.vortex.jni
Class NativeScan
java.lang.Object
dev.vortex.jni.NativeScan
JNI boundary for
Scan.-
Method Summary
Modifier and TypeMethodDescriptionstatic voidarrowSchema(long pointer, long schemaAddress) Export the scan's schema into the Arrow C Data Interface struct atschemaAddress.static longcreate(long dataSourcePointer, long projectionPointer, long filterPointer, long rowRangeBegin, long rowRangeEnd, long[] selectionIndices, byte selectionInclude, long limit, boolean ordered) Create a new scan from a data source.static voidfree(long pointer) Free a scan pointer.static longnextPartition(long pointer) Advance the scan and return the next partition pointer.static voidpartitionCount(long pointer, long[] out) Filloutwith[count, cardinality].
-
Method Details
-
create
public static long create(long dataSourcePointer, long projectionPointer, long filterPointer, long rowRangeBegin, long rowRangeEnd, long[] selectionIndices, byte selectionInclude, long limit, boolean ordered) Create a new scan from a data source. The scan is lazy: no I/O happens untilnextPartition(long)is called.- Parameters:
dataSourcePointer- pointer fromNativeDataSource.open(long, java.lang.String[], java.util.Map<java.lang.String, java.lang.String>)projectionPointer- native expression pointer, or 0 for "all columns"filterPointer- native filter expression pointer, or 0 for "no filter"rowRangeBegin- inclusive start of the row range, 0 for "unbounded"rowRangeEnd- exclusive end of the row range, 0 for "unbounded"selectionIndices- sorted row indices; may be nullselectionInclude-0(all),1(includeselectionIndices),2(excludeselectionIndices)limit- max rows to return, or0for "no limit"ordered- true to preserve row order across partitions
-
free
public static void free(long pointer) Free a scan pointer. -
arrowSchema
public static void arrowSchema(long pointer, long schemaAddress) Export the scan's schema into the Arrow C Data Interface struct atschemaAddress. -
partitionCount
public static void partitionCount(long pointer, long[] out) Filloutwith[count, cardinality]. -
nextPartition
public static long nextPartition(long pointer) Advance the scan and return the next partition pointer. Returns0when exhausted.
-