You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "LuciferYang (via GitHub)" <gi...@apache.org> on 2026/09/27 17:46:31 UTC

[I] Vector search metric guard is ineffective and ANN segments are scored with the wrong distance metric after the metric changes [paimon]

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: issues-unsubscribe@paimon.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Vector search metric guard is ineffective and ANN segments are scored with the wrong distance metric after the metric changes [paimon]

Posted by "LuciferYang (via GitHub)" <gi...@apache.org>.
LuciferYang closed issue #10263: Vector search metric guard is ineffective and ANN segments are scored with the wrong distance metric after the metric changes
URL: https://github.com/apache/paimon/issues/10263


-- 
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: issues-unsubscribe@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org