Repository navigation
feat(plan): support Boolean composition of indexed MATCH - #30190
mergify[bot] merged 8 commits into
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
3db51fc to
5856b5a
Compare
|
mo-bot review · Commit: Review completed. Read the assessment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: 5856b5a679197f302a655749cc54a1fbf5f46b90
Assessment: approve
Reviewed the complete 20-file delta and affected callers. The approved design preserves base rows through Boolean evaluation, normalizes missing scores below outer joins, and reuses existing search and execution owners. Legacy positive/projection behavior remains intact. No actionable findings remain; complete-stream joins and exact vector sorting are accepted correctness costs.
Model: gpt-6-astra / xhigh
Session: 01a13dcf-1517-7f90-b3f9-c5f9f9e7031b · slot 0 · generation 1
Validation:
-
Verified the approved design revision and SHA256; subsequent design changes contain approval metadata only, closing the earlier review objection.
-
Reconciled exact-head CI run 39700012142 with retained logs: Go 1.27.1 Linux/amd64 race UT passed, including all 4,063 planner tests across eight successful shards and the affected provider-package selection.
-
Verified BVT results: classic Boolean composition 80/80, wrapped-score compatibility 74/74, FULLTEXT2 Boolean composition 81/81; zero failures, ignored statements or abnormal results.
-
Verified successful ARM64 SCA, local diff checks, clean source identity, and command/source/exit receipts against retained artifacts. Audit and detailed assessment: /home/xupeng/.local/state/mo-bot/jobs/49b28723f820610254fe3af1/attempt-1/review-audit.log and review-report.txt.
Limitations:
-
Reused exact-head CPU CI without duplicating native tests locally. local_validation was empty; unretained author execution claims were not treated as verified evidence.
-
No production-scale performance or GPU measurements. Complete-stream memory/work costs and existing FULLTEXT2 asynchronous visibility remain documented limitations.
-
The linked issue contract was assessed through the frozen PR and versioned design; no separate issue snapshot was supplied.
Merge Queue Status
This pull request spent 3 hours 43 minutes 16 seconds in the queue, including 1 hour 3 minutes 33 seconds running CI. Required conditions to merge
|
What type of PR is this?
Which issue(s) this PR fixes:
issue #30166
What this PR does / why we need it:
Classic FULLTEXT and FULLTEXT2 currently reject scan-local
MATCH(...) OR scalar_predicateandNOT MATCH(...)with error 20105. This change supports those predicates, including nested AND/OR/NOT, while retaining nonmatching rows that qualify through a scalar branch and returning overlapping matches once per base row.The composition path attaches one complete, unique raw-score stream per distinct bound MATCH leaf with preserving LEFT joins, normalizes absent scores to typed zero below user outer joins, and evaluates the original Boolean expression in a FILTER. Emitted zero and negative scores, scalar SQL NULLs, and exact term/mode/parameter identities remain intact. Served scores can be consumed by projection, aggregation, windows, and ordering. Explicit FORCE INDEX FOR JOIN hints reach the same path. Cross-binding, missing-index, mismatched-index-parts, and unserved-score consumers retain their explicit refusal behavior.
This route requires a MATCH beneath OR/NOT in a scan-local WHERE predicate. Existing positive and projection-only MATCH membership behavior is unchanged; standalone projection does not globally gain zero-score rows. Fulltext candidate limits and ANN truncation are disabled for this composition path: explicit distance/score ordering and LIMIT/OFFSET operate on the complete Boolean-filtered set. FULLTEXT2 keeps its existing asynchronous visibility contract.
Design: exact approved design content, originally reviewed at
dce89ab1ad4f61eb157c84c2cd55e89902fbaa87(content SHA256df7d8bafc2772d79fe18934226c1c3608e51573348ba97494d6e9bc1e32a1925). User-facing supported/refused semantics are documented indocs/sql/fulltext-boolean-composition.md.Validation completed on the reviewed candidate source:
^TestFullTextBooleantests passed; owning planner/provider packages with all vet analyzers and incremental affected-package lint passed.5a0570ea70083c9365719009a5ed8d7618f9ed91: 12/12 checks, comprising eight expected real 20105 receipts across both engines and four positive/projection-only controls.fulltext_boolean_composition,fulltext2_boolean_composition, andfulltext_wrapped_score, twice on the same instance, each 235/235 with zero failed/ignored/abnormal cases. The reviewed SQL/result pairs were unchanged; database/snapshot teardown was verified between runs.Original publication provenance: reviewed original head
8c39a92bc3da43b88be525ae3da50b9e7bc0a434; Mac execution used temporary commit027e413ee700edf3e4810606f06ae6a6cf2e5c2d. That original publication only normalized the three local commits' author/committer identity. All three final heads have exactly the same complete Git treed721a6d69f1a24ded1087fa1a47ae8ea8e47a517, independently audited; no source change or duplicate runtime rerun was introduced by history recovery or attribution.Limits: bounded single-CN CPU validation, not production-scale capacity/performance, HNSW runtime, multi-CN, GPU/Sirius, or full repository CI. The separate #30164 optimization is not included; combined changes have planner-layer evidence only. Latest-main preflight at
fab7b5c0430a475bf64ad1619ce4d5249013a138merges cleanly, but its join/CTE changes have not been rerun as a combined runtime build. Local independent design, implementation, runtime acceptance, and cleanup gates are complete; this PR is ready for review. External repository approval and hosted CI remain merge gates, with no approval or CI-pass claim. Mergify subsequently merged that main into this branch at1188011cbd8638bfc2219839b579d089d5199c60(treeb0241134ebc52db0d18f0653eb595f3c0967710a); all 17 feature-change paths retain their reviewed bytes and modes. Original local execution remains proof at its recorded source tree; combined merged-main integration remains subject to hosted CI; see the scoped maintenance status below.Scoped CI maintenance
Maintenance commit:
bab2e835a0919d08e9646df8fc9bbb109263f7ca. This is an additional test-only correction, not part of the original identity-only publication described above.The source-head coverage failure in run 38599892439 came from the broadcast ownership fixture choosing scheduler completion when both completion and empty-consumer retirement were already observable. The waiter now rechecks retirement and preserves the received scheduler result for the unchanged terminal/error assertions. Genuine early completion, cancellation/deadline/error propagation, source interruption, output and allocation cleanup assertions remain intact.
Validation on source
15f3a5db33e56899d9292436d1502811cd4ec2a9plus this exact maintenance patch (Darwin arm64, Go 1.27.1, genuine matching native CPU SDK, GOMAXPROCS=2, build parallelism=1):set, all vet analyzers, all five directly affected ownership roots and their subcases: PASS.clamp(floor(30 / measured_seconds), 1, 100): PASS. The five roots are Product/HashJoin/LoopJoin shared-producer ownership and HashJoin/LoopJoin remote-source ownership.TestUnionNestedTopClearsAllocationOwnersfailed with a spill-budget error. A root-only five-run control also failed on the unmodified source (1/5) and candidate (3/5); that test never calls the changed helper. These controls establish an independent test instability, not a blanket attribution of every failure variant or product acceptance. No UNION expectations or resource budget were changed.For this maintenance delta, BVT is N/A: only a Go fixture's event-order oracle changes, with no production SQL entry point. The five real-operator ownership roots supply the corresponding regression evidence; the feature's canonical SQL/result pairs remain unchanged. Source15f hosted ordinary UT, SCA and both BVT jobs passed, while coverage/CI Required failed; none of those old runs is presented as new-head CI.
QA required: yes. This remains a user-visible FULLTEXT feature. Original bounded single-CN acceptance stays bound to its recorded original tree; deployment/multi-CN/capacity gates and external review remain separate. No issue closure, review approval, full-package success or new-head hosted-CI success is claimed by this maintenance update.
Rebase and current validation (2026-10-22)
Current source:
5856b5a679197f302a655749cc54a1fbf5f46b90, rebased onto main0276f82fb72941efba8d2f8de738f1cb04174dae. This section records current-source evidence; the earlier receipts remain historical evidence at their stated revisions.The vector-routing conflict preserves both the Boolean composition exact-sort refusal and main's plugin membership capability. The original merge-only IVF mixed-OR assertion is restored alongside main's volatile-filter control; the existing capability table now checks Boolean refusal for IVFFLAT, HNSW, CAGRA and IVFPQ. The old broadcast fixture workaround is superseded by main's durable completion handling and introduces no compile-package delta.
Normal comparison exposed 13 stale metadata header lines. Two Boolean result files now follow main's deliberate computed-BOOL numeric TINYINT contract from #30191; the wrapped-score fixture now expects precision 20 for its declared VARCHAR(20). SQL, row values, NULLs, ordering and error assertions remain unchanged; results were not regenerated.
Validation on Linux/amd64, Go 1.27.1, fresh matching CPU native artifacts and disk-backed temporary storage:
go test -race -count=1with bounded timeouts. These runs include existing roots, not just new cases.TestIssue30090ReplaceViewLifecycleOrderandTestISCPExecutor3, pass on the combined source withmatrixone_test. Main contains their synchronization corrections from test: fence cross-CN view visibility in prepared-reader rebind test #30382 and fix: preserve empty flush snapshots and synchronize async CI tests #30632.go vetand configured golangci-lint pass for all four affected packages; lint reports zero issues. Molint retains two existingrecoverdiagnostics in untouched FULLTEXT2 storage functions; the same diagnostics were independently reproduced on clean target0276f82fb7. No new delta finding is hidden.Design, metadata addendum and final overall review use
gpt-6.1-sol / xhigh. Design sessions:01a160f2-20f7-7072-9274-93df5a897de9and01a160fa-b994-7211-976d-8af38b838e87. Final review: session01a160fd-f414-74c0-82be-acd213747d5a, reviewed5856b5a679: PASS, zero unresolved material blockers.This remains bounded single-CN CPU validation. No new GPU, multi-CN or production-capacity claim is made. Fresh hosted CI results remain pending after publication.