Class JNIFile
- All Implemented Interfaces:
File
,AutoCloseable
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Closes this file and releases any associated resources.getDType()
Returns the data type (schema) of this Vortex file.newScan
(ScanOptions options) Creates a new iterator for scanning this file with the specified options.long
rowCount()
Returns the total number of rows in this Vortex file.
-
Constructor Details
-
JNIFile
public JNIFile(long pointer)
-
-
Method Details
-
getDType
Description copied from interface:File
Returns the data type (schema) of this Vortex file.The returned
DType
describes the logical structure and types of the data contained in this file. For structured data, this will typically be aDType.Variant.STRUCT
containing field names and their corresponding data types. The schema remains constant for the lifetime of the file. -
rowCount
public long rowCount()Description copied from interface:File
Returns the total number of rows in this Vortex file.This method provides the count of logical rows contained in the file, which represents the number of records or tuples that can be read. This count is independent of any filtering or projection that may be applied during scanning operations.
-
newScan
Description copied from interface:File
Creates a new iterator for scanning this file with the specified options.This method returns an
ArrayIterator
that can be used to traverse the data in this file according to the providedScanOptions
. The scan options allow for column projection, row filtering via predicates, and row range or index selection. Each call to this method creates a new independent iterator.The returned iterator must be properly closed when no longer needed to release any underlying resources. It is recommended to use the iterator within a try-with-resources statement.
- Specified by:
newScan
in interfaceFile
- Parameters:
options
- theScanOptions
configuring the scan behavior, including column selection, filtering, and row selection- Returns:
- a new
ArrayIterator
for scanning the file data - See Also:
-
close
public void close()Description copied from interface:File
Closes this file and releases any associated resources.This method should be called when the file is no longer needed to ensure proper cleanup of any underlying file handles, native memory, or other resources. After calling this method, the file should not be used for any further operations. This method is idempotent and can be called multiple times safely.
It is recommended to use this file within a try-with-resources statement to ensure automatic cleanup:
try (File file = VortexReader.open(path)) { // Use file } // close() is called automatically
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceFile
-