Package dev.vortex.jni
Class NativeFileMethods
java.lang.Object
dev.vortex.jni.NativeFileMethods
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
close
(long pointer) Close the file associated with the given pointer.static void
Delete the files at the provided URIs.static long
dtype
(long pointer) Get the data type of the file associated with the given pointer.listVortexFiles
(String uri, Map<String, String> options) List all Vortex files underneath the current file path.static long
Open a file using the native library with the provided URI and options.static long
rowCount
(long pointer) Get the total row count contained in the file associated with the given pointer.static long
Build a new native scan operator that will materialize Arrays from the file, pushing down the optional predicate, row range or row indices to perform data skipping.
-
Method Details
-
listVortexFiles
List all Vortex files underneath the current file path.- Parameters:
uri
- The URI describing both the object store and the path to the fileoptions
- Any options required to initialize the object store client- Returns:
- A list of URIs for the Vortex files below the provided path
-
delete
Delete the files at the provided URIs. Use the options to configure an object store client. -
open
Open a file using the native library with the provided URI and options.- Parameters:
uri
- The URI of the file to open. e.g. "file://path/to/file".options
- A map of options to provide for opening the file.- Returns:
- A native pointer to the opened file. This will be 0 if the open call failed.
-
rowCount
public static long rowCount(long pointer) Get the total row count contained in the file associated with the given pointer.- Parameters:
pointer
- The native pointer to a file. Must be a value returned byopen(String, Map)
.- Returns:
- The number of rows of data encoded in the file. This includes null values.
-
dtype
public static long dtype(long pointer) Get the data type of the file associated with the given pointer.- Parameters:
pointer
- The native pointer to a file. Must be a value returned byopen(String, Map)
.- Returns:
- Native pointer to the DType of the file. This pointer is owned by the file and should not be freed.
-
close
public static void close(long pointer) Close the file associated with the given pointer.- Parameters:
pointer
- The native pointer to a file. Must be a value returned byopen(String, Map)
.
-
scan
public static long scan(long pointer, List<String> columns, byte[] predicateProto, long[] rowRange, long[] rowIndices) Build a new native scan operator that will materialize Arrays from the file, pushing down the optional predicate, row range or row indices to perform data skipping.
-