Skip to content

feat(sql): support MySQL SOUNDS LIKE predicate - #31373

Merged
XuPeng-SH merged 6 commits into
matrixorigin:mainfrom
VioletQwQ-0:codex/issue-23010-sounds-like
Oct 27, 2026
Merged

XuPeng-SH merged 6 commits into
matrixorigin:mainfrom
VioletQwQ-0:codex/issue-23010-sounds-like

Conversation

@VioletQwQ-0

@VioletQwQ-0 VioletQwQ-0 commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

What type of PR is this?

  • API-change
  • BUG
  • Improvement
  • Documentation
  • Feature
  • Test and CI
  • Code Refactoring

Which issue(s) this PR fixes:

Related to #23010 (closed as not_planned) and the SOUNDS LIKE subitem of #24496. ROW constructors and issue closure are outside this PR.

What this PR does / why we need it:

SELECT 'Hello' SOUNDS LIKE 'Hallo' previously failed to parse. Lower the predicate to ordinary SOUNDEX(left) = SOUNDEX(right), using each operand once and retaining existing SOUNDEX type, NULL, binary/text and prepared-parameter behavior. Preserve non-reserved identifiers/implicit aliases and ordinary LIKE. Contextual lookahead uses the authoritative scanner on a copy, including executable comments, with a recursion guard. No new executor, function ID, JSON-to-SOUNDEX change from #30883, or ROW constructor implementation is included.

Current integration and validation

Head 2a3ab5d549805a4cefa1b860b81d9742c2206ac2 normally merges main 00c103b68bd2b39194147508445956f5ece16dda into 234270c60a57ad93bc47f7b15de6cea3ed2ebe43; no rebase or force update. The generated parser was the sole conflict and was regenerated from merged grammar, preserving main's JSON_TABLE charset changes and the SOUNDS predicate. Independent AI source review of the exact integrated feature delta found no blocking issue; this is not a maintainer approval or reviewer test rerun.

Fresh validation on this head, Linux amd64 / Go 1.27.1, repository native test wrapper:

  • Forced parser generation: zero conflicts, all 780 existing main token constants unchanged. Complete MySQL parser and facade packages passed with -count=1, covering executable comments, aliases, ordinary LIKE, typed nesting, marker order, HIGH_NOT_PRECEDENCE and format/reparse. Scoped vet, configured incremental lint (0 issues), formatting/diff checks passed.
  • Full make build NATIVE_BUILD_JOBS=4 passed, binary embeds 2a3ab5d54. On its fresh SQL/ISCP-ready owned instance, normal mo-tester Soundex/SOUNDS LIKE BVT passed 122/122 twice, no failed/ignored/abnormal statements. True/false/NULL independent oracles, expressions, prepared reuse, WHERE/CASE, CTAS and canonical view replay are covered. Terminal table/view and probe-schema residue checks were zero.
  • Real COM_STMT_PREPARE/EXECUTE reuse passed text, NULL, UTF-8 string, numeric type changes and trailing markers, with explicit SOUNDEX equality control and explicit binary-cast control. SHOW CREATE VIEW original-text and information_schema canonical-definition export/replay both passed.
  • The previously failing TestDropAccountDuringAsyncIndexInit passed fresh under coverage mode (6.78s test / 7.478s package), including durable registration, held initializer, real DROP rollback and cleanup assertions. Used the same pinned CI helper's 505-test-package / 484-instrumented-package selection, -short -tags matrixone_test -covermode=set -count=1, selecting this one test with local -p 2 and admission pool 2. This is targeted coverage qualification, not the entire hosted 505-package -p 8 run or a race result.

Prior CI failure and baseline repair

Old head e1c1311f... passed hosted required CI run 40441990982; identity-only successor 234270c... failed coverage job 122118653081 at async_index_drop_test.go:212: initializer not observed before the context deadline. No blind rerun was requested.

The old baseline lacks upstream #31237, already merged as fe4fc722a2f932d91ed86d3ef9d20f8a689e7cda. Main refresh brings its registration-side lifecycle marker and existing durable regression, rather than adding a separate ISCP fix. A diagnostic-only local A/B proved missing registration provenance (expected 1, actual 0) and the upstream marker correction passed the complete test. The original failed CI's actual quarantine event has not been verified; selected original events establish the timeout before DROP/cleanup, not that historical scheduling interleaving. New-head hosted CI remains separately pending and is not inferred from prior runs or local coverage success.

Compatibility and remaining limits

SHOW CREATE VIEW retains original SOUNDS LIKE text; information_schema VIEW_DEFINITION formats explicit SOUNDEX equality. Before an old-binary rollback, rewrite/remove new-syntax views and application/prepared SQL. No released-binary upgrade, mixed-version execution or deployed QA result is claimed. The first local attempt to reopen an older temporary data root failed with shard not bootstrapped; it was preserved and a fresh isolated data root was used for the passing SQL qualification. This is not an upgrade pass.

Versioned D1 design received independent AI technical approval at its original revision; the implementation and executable-comment correction received independent AI technical acceptance, followed by this merge-delta source review. GitHub commit attribution has been corrected and CLAassistant reported all committers signed. Ready requests formal upstream review, not merge, auto-merge, deployment, permission expansion or issue closure.

@CLAassistant

CLAassistant commented Oct 27, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@XuPeng-SH

XuPeng-SH commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

mo-bot review · mo-bot-local · done

Commit: 4f7f247cadfb6c9de79edc5353c87ead5c9dc8f5

Review completed. Read the assessment.

@XuPeng-SH XuPeng-SH left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mo-bot review · mo-bot-local · review

Commit: 4f7f247cadfb6c9de79edc5353c87ead5c9dc8f5

Assessment: approve

Reviewed the complete delta and frozen discussion. Lowering SOUNDS LIKE into existing SOUNDEX/equality correctly reuses established execution and type semantics without duplicating operands. The historical executable-comment finding is resolved by authoritative scanner lookahead and passing regressions. No actionable findings remain.

Model: gpt-6-astra / xhigh

Session: 01a13dcf-1586-7a01-9000-d45e20995cf8 · slot 1 · generation 1

Validation:

  • Full MySQL parser and parser-facade suites passed: 282 top-level tests, using the assigned isolated executor and freshly built, verified jemalloc prerequisite.

  • Regenerated parser matches byte for byte: zero conflicts, all 780 existing token values unchanged.

  • Verified that author-tested revision 2a3ab5d differs from the assigned head only in unrelated HNSW fixtures. Frozen current-head build, UT, SCA, coverage and BVT checks report success.

  • Receipts, source fingerprints and retained logs reconciled in /home/xupeng/.local/state/mo-bot/jobs/7bb552e47a02849a00545109/attempt-1/validation-audit.json. All three discussion keys recorded in discussion-assessment.json. Source remains unchanged.

Limitations:

  • Author-reported SQL BVT, binary-protocol and view-replay checks were not rerun locally; raw external logs were not supplied.

  • No downgrade execution was performed. Newly persisted SOUNDS LIKE SQL requires the documented rewrite/removal before using older binaries.

@mergify

mergify Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again.

@XuPeng-SH
XuPeng-SH merged commit 3b77525 into matrixorigin:main Oct 27, 2026
29 of 30 checks passed
@VioletQwQ-0
VioletQwQ-0 deleted the codex/issue-23010-sounds-like branch December 1, 2026 03:47

This branch was previously deployed

1 inactive deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/feature kind/test-ci size/XXL Denotes a PR that changes 2000+ lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants