Backport hybrid search filter and CI fixes to release/1.4.0 - #253
Merged
hnwyllmm merged 1 commit intoAug 3, 2026
Merged
Conversation
…e#252) ## Summary - constrain the `DBMS_HYBRID_SEARCH.GET_SQL` rewrite to backtick-quoted `JSON_EXTRACT(...)` expressions - preserve ordinary quoted identifiers in filtered BM25, KNN, and combined hybrid-search SQL - keep the pytest-summary fallback required by `pylibseekdb`, but fail on positive `failed`/`error(s)` counts and on missing successful summaries - add regression tests for both the SQL rewrite and CI summary parsing Fixes oceanbase#251. ## Root cause The previous regex could start at the closing backtick of one ordinary identifier and end at the opening backtick of another whenever an unquoted `JSON_EXTRACT` appeared between them. That produced malformed SQL for metadata-filtered hybrid searches. The integration tests already caught this regression, but the CI fallback required a literal `=======` in pytest's final line. When the summary format did not contain that exact marker, the `|| exit 0` branch marked the job successful even with failures. ## Validation - `pytest tests/unit_tests/test_hybrid_search_sql_rewrite.py tests/unit_tests/test_ci_pytest_summary.py -q` — 11 passed - `pytest tests/integration_tests/test_collection_hybrid_search.py -k embedded -q` — 7 passed - all four hybrid-search cases that failed in PR oceanbase#240's embedded job now pass - `prek run -a` — all checks passed Local full-unit-suite note: 463 tests passed and 318 skipped; 6 existing sentence-transformer tests failed because the local `transformers` installation imports an unavailable `huggingface_hub.is_offline_mode`. This is unrelated to the changed files. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved hybrid search SQL handling so quoted identifiers remain intact while supported JSON extraction expressions are processed correctly. * Added validation to ensure test runs report a valid, passing pytest summary. * **Tests** * Added coverage for successful, failed, interrupted, missing, and empty test summaries. * Added regression tests for hybrid search SQL rewriting, including quoted identifiers and JSON extraction expressions. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Backport #252 to
release/1.4.0.JSON_EXTRACTrewrite so hybrid-search metadata filters are not corrupted.Source
82e4989e2db54743f99e814ae77195df09b3534857701f8Validation
12 passed— targeted unit tests7 passed, 14 deselected— embedded hybrid-search integration testsbash -n .github/scripts/check-pytest-summary.sh.venv/bin/prek run -a