Invalidate precomputed_table after add and handle k=0 in TopKHeap

- Clear precomputed_table in add_batch() alongside fastscan_codes,
  preventing stale table from being used after new vectors are added.
  Matches the invalidation already done by merge_from().

- Guard TopKHeap::push against k=0 to avoid panic on empty heap access.

- Add test_precomputed_table_invalidated_after_add regression test:
  build_precomputed_table → add → assert cleared → rebuild → search
  finds vectors from both batches.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 file changed
tree: f2d068d1dc41b0e96e969323ae5df9f80cf84d07
  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.