Repository navigation
[Build] Upgrade paimon-vindex-core to 0.6.0 - #1502
Merged
JingsongLi merged 3 commits intoNov 23, 2026
Merged
Conversation
Contributor
|
+1 |
leaves12138
approved these changes
Nov 23, 2026
leaves12138
left a comment
There was a problem hiding this comment.
Reviewed the full diff at head 11917a4 against main (19 files, +108/-175; branch is up to date with main), cross-checked against the published paimon-vector-index v0.6.0 sources (core/src/index/router.rs, core/src/kmeans.rs) and the release notes (RC4, crates.io / Maven Central / PyPI artifacts all live).
Core / generic semantics touched (flagging per review policy):
- Dependency bump
paimon-vindex-core0.5.0 -> 0.6.0 in the core crate and the C/Python bindings, withCargo.lockand all generated DEPENDENCIES inventories refreshed consistently. - Centroid routing (
centroid_index.rs) delegates to the libraryCentroidRouter: the hand-rolledPVROUT01encode/decode, nearest/assign scans, and the 512 MiB centers bound are replaced by the library serializer,find_nearest_centroids,assign_centroid, andMAX_SERIALIZED_BYTES. The PaimonPAIMCENTdescriptor and JSON envelope are unchanged; envelope and native payload are now written sequentially through one output stream (Vec<Bytes>parts) instead of one concatenated buffer. - Training plumbing:
train_spilled_model/SpilledVectors::train_routerreturnVectorIndexTrainingand the router is built viaCentroidRouter::from_training, matching the 0.6.0 trainer API split. - Reader tests disable the new 0.6.0 IVF-Flat partition cache (
vindex.reader.memory-budget-bytes=0) only in the tests that count file reads to measure within-batch list reuse and chunking; result and I/O assertions are preserved.
What I verified:
- Wire compatibility: the library
serialize/deserializeuse the identicalPVROUT01header (magic, LE dimension/nlist/metric, LE f32 centers) that the removed Rust code wrote, so Java-written and previously Rust-written router files load unchanged; the envelope checks (version, shard mode, model ID) and the manifest nlist cross-check are retained. Reading the metric from payload offset 16 after library validation is safe (header is at least 20 bytes and the metric code is validated by the library). - Ordering semantics:
find_topk_checkedsorts by distance then centroid index, identical to the removedtotal_cmp+ index tie-break; cosine queries are normalized before Euclidean coarse assignment, and inner-product routing still uses the L2 training space, as before. Requestingexplicit_width.unwrap_or(nlist)nearest centroids returns the full ordered list (nprobe is clamped to nlist), so the widening loop can still slice progressively wider prefixes; zero-width routes skip the call entirely. - Non-finite query coordinates and distances still fail loudly through the library validation; the size pre-check before allocation now uses the library bound.
- The joint-probe test builds its router through real training (
VectorIndexTrainer+from_training) and the shared envelope encoder, exercising the same write path as production; Java-written centroid file tests, joint probing, and Bitmap filtering all pass (251 tests per the PR body).
No findings. CI is fully green at this head (15/15 checks).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Use the published Apache Paimon Vector Index 0.6.0 release in Rust.
Brief change log
paimon-vindex-corein the core crate and the C and Python bindings. RefreshCargo.lockand the generated dependency inventories.CentroidRouterfor training output, shard assignment, nearest-centroid lookup, andPVROUT01encoding and decoding. Write the Paimon envelope and native payload in order through the same output stream.Tests
cargo test --locked -p paimon --lib -- vindex:: centroid vindex_index_build_builder— 251 passed, 1 ignored (manual benchmark). Coverage includes Java-written centroid files, joint probing, and Bitmap filtering.cargo check --locked -p paimon-c -p pypaimon_rustcargo check --locked -p paimon-c --testscargo tree --locked -i paimon-vindex-coreresolves the core and both bindings to 0.6.0.cargo deny --locked --all-features check --warn unmaintained advisories licensespython3 scripts/dependencies.py verifypython3 scripts/release_licenses.py --checkAPI and Format
Paimon writes the existing
PAIMCENTdescriptor and JSON envelope around the library'sPVROUT01payload. The library applies its 0.6.0 router metadata size bound.Documentation
Regenerated the dependency inventories for the binary distributions.