Validate PQ header invariants on open

Reject unsupported or inconsistent PQ parameters in open() before
constructing ProductQuantizer:
- ksub must be 16 (4-bit) or 256 (8-bit)
- d must equal m * dsub
- 4-bit PQ (ksub=16) requires even m

This prevents malformed headers from reaching search code with
nonsensical parameters. Also fix test_huge_pq_section_size_returns_error
to use valid ksub=256 so it tests the section-size cap path instead of
being caught earlier by the new ksub check.

- Add test_unsupported_ksub_returns_error
- Add test_d_not_equal_m_times_dsub_returns_error

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 file changed
tree: 084bebaae48b003bfabc0a711f3221cf44663bdd
  1. .github/
  2. core/
  3. .asf.yaml
  4. .gitignore
  5. Cargo.toml
  6. copyright.txt
  7. deny.toml
  8. LICENSE
  9. NOTICE
  10. README.md
README.md

Apache Paimon Vector Index   Build Status

Pure Rust IVF-PQ implementation for Apache Paimon. Designed for data lake (S3/HDFS/OSS) with seek-based I/O, supporting both 8-bit and 4-bit PQ with SIMD acceleration.

Contributing

Apache Paimon Vector Index is an exciting project currently under active development. Whether you're looking to use it in your projects or contribute to its growth, there are several ways you can get involved:

Getting Help

Submit issues for bug report or asking questions in discussion.

License

Licensed under Apache License, Version 2.0.