JunRuiLee opened a new pull request, #555: URL: https://github.com/apache/paimon-rust/pull/555
### Purpose Part of #514. Java primary-key (PK) vector search builds its ANN reader through the generic `GlobalIndexer.create(segment.indexType(), ...)` registry (`PkVectorAnnSegmentSearcher`), so a PK table may use either the native ivf-* (vindex) engine or the Lumina engine (DiskANN as its internal index). The Rust PK read path, however, hardcoded the vindex reader in two places — the ANN scorer and the per-segment metric verification — so a Java-written PK table with `fields.<col>.pk-vector.index.type = lumina` was unreadable (the vindex reader failed to open a Lumina segment). The Rust data-evolution/append vector path already dispatches on the backend; this change wires the same dispatch onto the PK path. ### Brief change log - Add `VectorSearchMetric::from_lumina`, symmetric to the existing `from_vindex`. - Resolve one `VectorIndexBackend` per PK search from the configured index type (a PK table uses a single index type — enforced on the Java side and already filtered on the Rust side), failing loud on an unrecognized type. - `verify_pk_vector_segment_metrics`: read the Lumina metric from the segment's index metadata and the vindex metric from the segment file bytes. - ANN scorer: build `LuminaVectorGlobalIndexReader` or `VindexVectorGlobalIndexReader` based on the resolved backend. ### Tests - Unit tests: `from_lumina` variant mapping; the Lumina branch of the segment metric check (matching + mismatch, over a synthetic Lumina index-metadata blob); backend classification (`lumina`/`lumina-vector-ann` -> Lumina, ivf-* -> vindex). - `cargo test -p paimon` passes (lib + integration). - Note: an end-to-end Lumina PK read requires the Lumina native library, which is unavailable in this environment; a cross-language Lumina fixture is a follow-up. ### API and Format No API or on-disk format change. Read-only; the data-evolution/append path is unchanged. ### Documentation No documentation changes. -- 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]
