libs/parquet-rs/README.md
libs/parquet-rs provides Parquet file operations backed by a Rust native
library (libes_parquet_rs), loaded at runtime via Panama FFI. Higher-level
Java abstractions are built on top of the low-level FFI bindings in libs/native.
libs/parquet-rs/
├── src/main/java/ # Java module (org.elasticsearch.parquetrs)
│ └── ParquetRs.java # Entry point — delegates to libs/native
├── native/ # Rust native library (libes_parquet_rs)
│ ├── src/ # Rust source (see native/README.md)
│ ├── Cargo.toml / Cargo.lock # Rust dependencies (pinned for reproducibility)
│ ├── Makefile # Cross-compilation build (all platforms)
│ ├── Dockerfile.rust-toolchain
│ └── publish_pqrs_binaries.sh
└── build.gradle
libs/native — Low-level Panama FFI bindings
ParquetRsLibrary.java — interface declaring native function signaturesJdkParquetRsLibrary.java — Panama implementation, loads libes_parquet_rsParquetRsFunctions.java — public facade with error handling (throws IOException)ParquetRsFunctionsTests.java — unit tests for the FFI functionsx-pack/plugin/esql-datasource-parquet-rs — ESQL plugin consumer
ParquetRsNativeTests.java — end-to-end integration tests with real Parquet filesSee native/README.md for Rust build instructions,
cross-compilation, and the publish workflow.
# Low-level FFI tests (libs/native)
./gradlew :libs:native:test --tests "org.elasticsearch.nativeaccess.ParquetRsFunctionsTests"
# End-to-end integration tests (plugin module)
./gradlew :x-pack:plugin:esql-datasource-parquet-rs:test
Both require the native library to be available — either from Artifactory
(automatic) or built locally via make install in native/. When using a
locally built library, set LOCAL_PQRS_BINARY=true to skip the Artifactory
download:
LOCAL_PQRS_BINARY=true ./gradlew :libs:native:test --tests "org.elasticsearch.nativeaccess.ParquetRsFunctionsTests"