Package dev.vortex.jni
Class NativeDataSource
java.lang.Object
dev.vortex.jni.NativeDataSource
JNI boundary for
DataSource.-
Method Summary
Modifier and TypeMethodDescriptionstatic voidarrowSchema(long sessionPointer, long pointer, long schemaAddress) Export the data source's schema into the Arrow C Data Interface struct atschemaAddress.static voidbyteSize(long pointer, long[] out) Populateoutwith[bytes, precision], the sum of on-storage file sizes for the data source.static voidfree(long pointer) Free a data source pointer.static longOpen a data source from one or more URIs or globs.static longopenFiles(long sessionPointer, Object[] readables, String[] names, long[] lengths, int readConcurrency) Open a data source over caller-providedNativeReadableobjects.static voidrowCount(long pointer, long[] out) Populateoutwith[rows, cardinality].
-
Method Details
-
open
Open a data source from one or more URIs or globs.- Parameters:
sessionPointer- pointer fromNativeSession.newSession()uris- paths or globs (for example["file:///a.vortex", "file:///b.vortex"])options- object-store properties (may be null)
-
openFiles
public static long openFiles(long sessionPointer, Object[] readables, String[] names, long[] lengths, int readConcurrency) Open a data source over caller-providedNativeReadableobjects. All reads become upcalls into the supplied readables; no native storage client is created.- Parameters:
sessionPointer- pointer fromNativeSession.newSession()readables- oneNativeReadableper filenames- unique name per file (fromNativeReadable.name()), parallel toreadableslengths- file sizes in bytes, parallel toreadablesreadConcurrency- maximum in-flightreadFullyupcalls across all files of this data source;<= 0selects the default
-
free
public static void free(long pointer) Free a data source pointer. -
arrowSchema
public static void arrowSchema(long sessionPointer, long pointer, long schemaAddress) Export the data source's schema into the Arrow C Data Interface struct atschemaAddress. Extension dtypes are dispatched through the session's registered Arrow export plugins.- Parameters:
sessionPointer- pointer fromNativeSession.newSession()
-
rowCount
public static void rowCount(long pointer, long[] out) Populateoutwith[rows, cardinality]. Cardinality is one of0=unknown,1=estimate,2=exact. -
byteSize
public static void byteSize(long pointer, long[] out) Populateoutwith[bytes, precision], the sum of on-storage file sizes for the data source. Precision is one of0=unknown,1=estimate,2=exact.
-