Class JdkParquetRsLibrary

java.lang.Object
org.elasticsearch.nativeaccess.jdk.JdkParquetRsLibrary
All Implemented Interfaces:
ParquetRsLibrary

public final class JdkParquetRsLibrary extends Object implements ParquetRsLibrary
Panama FFI bindings to the Rust es_parquet_rs shared library for Parquet operations.
  • Constructor Details

    • JdkParquetRsLibrary

      public JdkParquetRsLibrary()
  • Method Details

    • lastError

      public String lastError()
      Description copied from interface: ParquetRsLibrary
      Returns the last error message from the native library, or null if none.
      Specified by:
      lastError in interface ParquetRsLibrary
    • getStatistics

      public long[] getStatistics(String path, String configJson)
      Description copied from interface: ParquetRsLibrary
      Reads Parquet file statistics.
      Specified by:
      getStatistics in interface ParquetRsLibrary
      Parameters:
      path - the path to the Parquet file
      configJson - optional JSON storage configuration, or null
      Returns:
      a two-element array: [totalRows, totalBytes], or null on error
    • getSchemaFFI

      public int getSchemaFFI(String path, String configJson, long schemaAddr)
      Description copied from interface: ParquetRsLibrary
      Exports the Parquet file's Arrow schema via the Arrow C Data Interface. Writes an FFI_ArrowSchema to the given memory address.
      Specified by:
      getSchemaFFI in interface ParquetRsLibrary
      Parameters:
      path - the path to the Parquet file
      configJson - optional JSON storage configuration, or null
      schemaAddr - memory address of a pre-allocated ArrowSchema FFI struct
      Returns:
      0 on success, -1 on error (check ParquetRsLibrary.lastError())