You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "JingsongLi (via GitHub)" <gi...@apache.org> on 2026/06/08 13:00:23 UTC

[PR] Add Java and Python vector index APIs [paimon-vector-index]

JingsongLi opened a new pull request, #16:
URL: https://github.com/apache/paimon-vector-index/pull/16

   ## Summary
   
   Adds first-class Java and Python APIs on top of the existing IVFPQ native/core implementation. The PR also wires Java/Python API checks into CI so reader/writer lifecycle, batch search, and Roaring filter pushdown stay covered.
   
   ## Changes
   
   - Add Java JNI facade classes for metrics, reader/writer lifecycle, single-query search, batch search, and defensive-copy result containers.
   - Add a Java API test that compiles and exercises the public facade/result behavior with JDK 8.
   - Extend the Python binding with `IVFPQWriter`, `IVFPQReader.search_batch`, 2D NumPy batch results, shared validation, and file-like output handling.
   - Add Python API tests covering writer-to-reader roundtrip, batch search, Roaring filter bytes, shape validation, and short-write detection.
   - Document Java/Python binding entry points and add CI steps for Java/Python API tests.
   
   ## Testing
   
   - `cargo fmt --all --check`
   - `cargo fmt --manifest-path python/Cargo.toml --check`
   - `javac -source 8 -target 8 -d target/java-api-test $(find jni/java jni/java-test -name '*.java') && java -cp target/java-api-test org.apache.paimon.index.ivfpq.IVFPQJavaApiTest`
   - `cargo clippy --workspace --all-targets -- -D warnings`
   - `cargo clippy --manifest-path python/Cargo.toml --no-default-features --features auto-initialize --all-targets -- -D warnings`
   - `cargo test --workspace`
   - `cargo test --manifest-path python/Cargo.toml --no-default-features --features auto-initialize`
   - `cargo build -p paimon-vindex-jni --release`
   - `cargo check --manifest-path python/Cargo.toml`
   - `maturin build --release`
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add Java and Python vector index APIs [paimon-vector-index]

Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi merged PR #16:
URL: https://github.com/apache/paimon-vector-index/pull/16


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add Java and Python vector index APIs [paimon-vector-index]

Posted by "leaves12138 (via GitHub)" <gi...@apache.org>.
leaves12138 commented on code in PR #16:
URL: https://github.com/apache/paimon-vector-index/pull/16#discussion_r3373613812


##########
.github/workflows/ci.yml:
##########
@@ -131,6 +137,9 @@ jobs:
       - name: Install maturin
         run: pip install maturin
 
+      - name: Test Python API
+        run: cargo test --manifest-path python/Cargo.toml --no-default-features --features auto-initialize

Review Comment:
   This job installs `maturin`, but the new Python tests create and inspect NumPy arrays via the `numpy` crate. Without the Python `numpy` package available in the selected interpreter, `cargo test --manifest-path python/Cargo.toml --no-default-features --features auto-initialize` fails at runtime with `ModuleNotFoundError: No module named 'numpy'`. Please install it here, for example `pip install maturin numpy`, before running the Python API tests.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org