QuakeWang opened a new pull request, #37:
URL: https://github.com/apache/paimon-vector-index/pull/37
## Summary
User input validation already rejects NaN and Infinity, but corrupted or
older index files could still persist non-finite f32 values in reader-side
float sections. Those values could enter search ranking and hit
partial_cmp().unwrap() panic paths, crossing JNI as a panic-boundary error
instead of a normal malformed-index error.
This PR rejects non-finite persisted f32 values while decoding v1 reader
sections for IVF-FLAT, IVF-HNSW-FLAT, IVF-PQ, and IVF-HNSW-SQ. It also hardens
reader-side top-k ordering with total_cmp and keeps intentional JNI
panic-boundary tests separate from malformed-index error coverage.
## Testing
- cargo fmt --all -- --check
- cargo build --all-targets
- cargo test -p paimon-vindex-core
- cargo clippy --all-targets --workspace -- -D warnings
- cargo clippy -p paimon-vindex-jni --all-targets --features
panic-boundary-test-hook -- -D warnings
- mvn -f java/pom.xml test
- cargo build -p paimon-vindex-jni --release --features
panic-boundary-test-hook
- java -cp java/target/classes:java/target/test-classes
org.apache.paimon.index.vector.VectorIndexNativePanicBoundaryTest
target/release/libpaimon_vindex_jni.dylib
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]