JingsongLi commented on PR #8293:
URL: https://github.com/apache/paimon/pull/8293#issuecomment-4755811240

   Thanks for the careful check. Fixed the `inner_product` score conversion in 
both readers to use `-distance`, since paimon-vindex returns `-dot(query, 
vector)` and upper-level merge/top-k expects larger scores to be better.
   
   I also added regression coverage:
   - Java: 
`NativeVectorGlobalIndexTest#testInnerProductDistanceConvertedToHigherIsBetterScore`
 validates conversion and `topK` selection.
   - Python: `vindex_vector_index_test.py` validates conversion and `top_k` 
selection.
   
   Validation run:
   - `python -m py_compile 
paimon-python/pypaimon/globalindex/vindex/vindex_vector_global_index_reader.py 
paimon-python/pypaimon/tests/vindex_vector_index_test.py`
   - `python -m pytest paimon-python/pypaimon/tests/vindex_vector_index_test.py 
-v`
   - `mvn -pl paimon-vector -am -Pfast-build -DfailIfNoTests=false 
-Dtest=NativeVectorGlobalIndexTest#testInnerProductDistanceConvertedToHigherIsBetterScore
 test`
   - `mvn -pl paimon-vector -am -Pfast-build -DfailIfNoTests=false 
-Dtest=NativeVectorGlobalIndexerFactoryTest,SeekableStreamVectorIndexInputTest,NativeVectorGlobalIndexTest,org.apache.paimon.JavaPyE2ETest#testVindexVectorIndexWrite
 test -Drun.e2e.tests=true`
   - `mvn -pl paimon-vector -am -DskipTests compile`


-- 
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]

Reply via email to