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/10 13:52:48 UTC
[PR] Simplify vector index options API [paimon-vector-index]
JingsongLi opened a new pull request, #31:
URL: https://github.com/apache/paimon-vector-index/pull/31
## Summary
Simplify the Java/JNI and Python vector index writer APIs to accept string options directly, matching the Paimon-style configuration surface. Rust now owns parsing and validation of those options before constructing the internal typed vector index config.
## Changes
- Add `VectorIndexConfig::from_options` in the Rust core with canonical option keys and strict validation.
- Replace Java writer construction with `VectorIndexWriter(Map<String, String>)` and pass option key/value arrays through JNI.
- Remove the unpublished Java index-specific config classes and simplify metadata HNSW accessors to plain fields.
- Replace Python config pyclasses with `VectorIndexWriter(dict)` and remove compatibility factory helpers.
- Update README and Java/Python tests for the options-based API.
## Testing
- [x] `cargo test --workspace`
- [x] `cargo test --manifest-path python/Cargo.toml --no-default-features --features auto-initialize`
- [x] `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.VectorIndexJavaApiTest`
- [x] `cargo clippy --all-targets --workspace -- -D warnings`
- [x] `cargo clippy --manifest-path python/Cargo.toml --no-default-features --features auto-initialize --all-targets -- -D warnings`
- [x] `cargo build -p paimon-vindex-jni && java -cp target/java-api-test org.apache.paimon.index.ivfpq.VectorIndexNativePanicBoundaryTest "$(pwd)/target/debug/libpaimon_vindex_jni.dylib"`
## Notes
This intentionally does not preserve compatibility with the previous config classes because the API has not been released yet.
--
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] Simplify vector index options API [paimon-vector-index]
Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi commented on PR #31:
URL: https://github.com/apache/paimon-vector-index/pull/31#issuecomment-4671170818
Thanks for the review. I merged the latest main and resolved the VectorIndexWriter conflict in 1d91caf, keeping the native handle lifecycle guard from main (nativeHandleLock/nativeHandleOwner and enter/exit wrapping around JNI calls) while preserving the options-based writer API. I also updated the new native handle safety test to construct writers with options.
--
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] Simplify vector index options API [paimon-vector-index]
Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi commented on PR #31:
URL: https://github.com/apache/paimon-vector-index/pull/31#issuecomment-4671226355
Follow-up: removed Java-side positive/count/search parameter validation so those semantic checks are handled by the native/Rust layer. Java now only keeps null checks and native handle lifecycle guarding. I also added exact query array length checks in JNI to avoid silently truncating oversized Java arrays.
--
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] Simplify vector index options API [paimon-vector-index]
Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi merged PR #31:
URL: https://github.com/apache/paimon-vector-index/pull/31
--
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