LuciferYang opened a new issue, #10263: URL: https://github.com/apache/paimon/issues/10263
### Search before asking - [X] I searched in the [issues](https://github.com/apache/paimon/issues) and found no similar issues. ### Paimon version master (1.5-SNAPSHOT) ### Compute Engine Any engine using a primary-key table with a pk-vector ANN index (the distance metric is configured via `fields.<col>.pk-vector.distance.metric`). ### Minimal reproduce step 1. Create a primary-key table with a pk-vector column and `distance.metric = inner_product`. 2. Write rows so the ANN index segments are built. 3. Change the column's `distance.metric` to a different value. 4. Run a vector search. ### What doesn't meet your expectations? The search silently scores the already-built ANN segments with the new metric, so the nearest-neighbor results are wrong. `PkVectorAnnSegmentSearcher` has a guard that is meant to reject searching a segment whose metric differs from the configured one, but it compares the current metric against a value derived from the same current configuration, so both sides are always equal and the guard never fires. ### Anything else? The segment stores no record of the metric it was built with, so the searcher has no way to detect the mismatch today. A fix needs to persist the build-time metric in the segment metadata and compare against that. ### Are you willing to submit a PR? - [X] I'm willing to submit a PR! -- 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]
