Repository navigation
fix(plan): hash safe arithmetic and OR EXISTS predicates - #32087
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? |
|
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: 3c96ad5bb567b39fe55d891db17ec194228e5b57
Assessment: approve
The fix coherently reuses existing range proofs, totality checks and hash executors. The bounded OR expansion preserves NULL semantics, outer-row multiplicity, conservative error fallbacks and index hints. No actionable defects remain.
Model: gpt-6.1-sol / max
Session: 01a1a004-90c3-73b1-acc9-3d4636452003 · slot 0 · generation 0
Validation:
-
Full planner and compiler package tests passed with Go 1.27.1, -count=1 and the assigned test-exec: 4,658 and 1,687 top-level tests. All 13 changed test roots passed; two unrelated subtests were skipped. Log: plan-compile-test.log; receipt: checks/1793720468225950798-3.json.
-
Independent SQLite oracle matched all 26 row-result queries in the 43-statement SQL fixture. Log: sql-result-oracle.log; receipt: checks/1793720312434184680-3.json.
-
Isolation preflight, native build and native provenance verification passed. Source identity, clean checkout, discussion coverage and execution receipts reconciled successfully in validation-evidence.json; audit receipt: checks/1793720608082492196-3.json.
-
Reviewed all nine changed files, complete discussion, linked issues and affected planner/compiler consumers. Frozen exact-head CI reports successful UT, SCA, shared build and multi-CN BVT checks.
Limitations:
-
No fresh MatrixOne SQL runtime or performance run was performed locally; author-reported execution and timing results were not independently reproduced.
-
The SQLite oracle excludes wire metadata and MatrixOne-specific overflow evaluation order. Raw CI logs and earlier author validation artifacts were unavailable.
✅ Merged into
|
aunjgr
left a comment
There was a problem hiding this comment.
Reviewed all nine changed files, the predicate/origin totality checks, independent-arm rebinding and hint ownership, MARK conversion, compile consumer tests, and SQL result pairs. No actionable finding. Arithmetic admission reuses exact overload/intermediate-range proofs rather than assuming determinism implies totality. OR expansion is capped at eight arms, admits only safe same-block scan chains, and totalizes each existence marker before combining/negating, preserving duplicate outer rows and EXISTS versus IN/ANY/ALL NULL semantics. Unsafe expressions, volatile/fallible projections, complex inner inputs, extra correlations, cancellation and hint paths retain explicit controls. Reused the recorded planner/compiler and public SQL differential/comparison evidence and successful current-head CI; no new local test run.
What type of PR is this?
Which issue(s) this PR fixes:
Fixes #31869
What this PR does / why we need it:
Avoid quadratic nested-loop joins for safe expression-correlated EXISTS/NOT EXISTS predicates such as
i.id = o.id - 1.Validation with Go 1.27.1:
go vet, incremental lint, and the standard service build passed. Changed-statement coverage: 117/119 (98.3%).Validation was performed on
dd2499cdcdplus this patch and reused after syncing the unrelated MinIO range-read and HA deployment changes in38f4ba6804; the affected SQL paths, fixtures, toolchain, and DISK-V2 test backend are unchanged.