QuakeWang opened a new pull request, #8327:
URL: https://github.com/apache/paimon/pull/8327
### Purpose
Hybrid search route weights were only checked with `weight <= 0`. `NaN`
bypassed that check, while `Infinity` was accepted and could dominate RRF or
weighted-score fusion.
This PR requires route weights to be finite and positive across Java, Spark
TVF parsing, and Python. It also validates direct `HybridSearchRanker` weight
inputs through `WeightedResult`.
### Tests
- `mvn -pl paimon-common -Dtest=HybridSearchRankerTest,FullTextQueryTest
test`
- `mvn -pl paimon-spark/paimon-spark-common -am -DfailIfNoTests=false
-DwildcardSuites=org.apache.paimon.spark.catalyst.plans.logical.VectorSearchQueryTest
-Dtest=none test`
- `PYTHONPATH=paimon-python python -m pytest
paimon-python/pypaimon/tests/hybrid_search_ranker_test.py -q`
- `uv run --with flake8==4.0.1 flake8 --config=paimon-python/dev/cfg.ini
paimon-python/pypaimon/table/source/hybrid_search_builder.py
paimon-python/pypaimon/tests/hybrid_search_ranker_test.py`
--
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]