Skip to content

fix: quote embedded backticks in clone paths - #26317

Merged
mergify[bot] merged 2 commits into
matrixorigin:mainfrom
VioletQwQ-0:codex/issue-26127-embedded-backtick
Jul 28, 2026
Merged

mergify[bot] merged 2 commits into
matrixorigin:mainfrom
VioletQwQ-0:codex/issue-26127-embedded-backtick

Conversation

@VioletQwQ-0

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:

issue #26127

What this PR does / why we need it:

Valid table identifiers containing an embedded backtick crossed three different
representation boundaries incorrectly:

  • table CLONE/Data Branch SQL-escaped the decoded identifier before semantic
    catalog lookup, resolving a different table name;
  • database CLONE/Data Branch interpolated catalog names into SHOW CREATE TABLE without identifier escaping;
  • DROP DATABASE interpolated relation names into its internal DROP TABLE
    without identifier escaping.

This change keeps decoded names unchanged for engine lookup and quotes them only
at SQL-generation boundaries. The embedded regression independently exercises
ordinary table clone, table branch, database branch, database clone, and DROP
DATABASE, including terminal row/catalog assertions.

Validation:

  • go build ./pkg/frontend ./pkg/sql/compile ./pkg/sql/plan
  • go vet ./pkg/frontend ./pkg/sql/compile ./pkg/sql/plan ./pkg/tests/issues
  • full pkg/frontend, pkg/sql/compile, and pkg/sql/plan tests
  • embedded five-path regression, normal and -race
  • preflight: PASS review=PASS validation=PENDING

QA handoff required: yes. Please verify all five quoted-identifier paths in a
deployed test environment before closing the issue.

@mergify mergify Bot added the kind/bug Something isn't working label Jul 28, 2026
@matrix-meow matrix-meow added the size/M Denotes a PR that changes [100,499] lines label Jul 28, 2026
@VioletQwQ-0
VioletQwQ-0 marked this pull request as ready for review July 28, 2026 11:03
@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 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.

Deep review complete: semantic catalog lookups now use decoded identifiers, SQL generation consistently quotes embedded backticks, and the clone/branch/drop functional closure is covered. Local owning-package tests, the five-path embedded regression, go vet, and current CI all pass.

@mergify mergify Bot added the queued label Jul 28, 2026
@mergify

mergify Bot commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • ✅ Entered queue — 2026-07-28 16:10 UTC · Rule: main · triggered by rule Automatic queue on approval for main
  • ✅ Checks passed · in-place
  • ✅ Merged — 2026-07-28 17:30 UTC · at b01486c8a3583dabc6901bf9531b2aaaf7d61fd4 · squash

This pull request spent 1 hour 20 minutes 10 seconds in the queue, including 42 minutes 7 seconds running CI.

Required conditions to merge
  • #review-threads-unresolved = 0 [🛡 GitHub branch protection]
  • github-review-approved [🛡 GitHub branch protection]
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Standlone CI / e2e BVT Test on Linux/x64(LAUNCH, PESSIMISTIC)
    • check-neutral = Matrixone Standlone CI / e2e BVT Test on Linux/x64(LAUNCH, PESSIMISTIC)
    • check-skipped = Matrixone Standlone CI / e2e BVT Test on Linux/x64(LAUNCH, PESSIMISTIC)
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone CI / UT Test on Ubuntu/x86
    • check-neutral = Matrixone CI / UT Test on Ubuntu/x86
    • check-skipped = Matrixone CI / UT Test on Ubuntu/x86
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone CI / SCA Test on Linux/arm64
    • check-neutral = Matrixone CI / SCA Test on Linux/arm64
    • check-skipped = Matrixone CI / SCA Test on Linux/arm64
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Compose CI / multi cn e2e bvt test docker compose(PROXY)
    • check-neutral = Matrixone Compose CI / multi cn e2e bvt test docker compose(PROXY)
    • check-skipped = Matrixone Compose CI / multi cn e2e bvt test docker compose(PROXY)
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Utils CI / Coverage
    • check-neutral = Matrixone Utils CI / Coverage
    • check-skipped = Matrixone Utils CI / Coverage
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone UT Coverage / UT Coverage on Ubuntu/x86
    • check-neutral = Matrixone UT Coverage / UT Coverage on Ubuntu/x86
    • check-skipped = Matrixone UT Coverage / UT Coverage on Ubuntu/x86

@mergify
mergify Bot merged commit 1ce594d into matrixorigin:main Jul 28, 2026
25 of 26 checks passed
@mergify mergify Bot removed the queued label Jul 28, 2026
@VioletQwQ-0
VioletQwQ-0 deleted the codex/issue-26127-embedded-backtick branch July 29, 2026 08:18
VioletQwQ-0 added a commit to VioletQwQ-0/matrixone that referenced this pull request Sep 17, 2026
Valid table identifiers containing an embedded backtick crossed three different
representation boundaries incorrectly:

- table CLONE/Data Branch SQL-escaped the decoded identifier before semantic
catalog lookup, resolving a different table name;
- database CLONE/Data Branch interpolated catalog names into `SHOW CREATE
TABLE` without identifier escaping;
- DROP DATABASE interpolated relation names into its internal `DROP TABLE`
without identifier escaping.

This change keeps decoded names unchanged for engine lookup and quotes them only
at SQL-generation boundaries. The embedded regression independently exercises
ordinary table clone, table branch, database branch, database clone, and DROP
DATABASE, including terminal row/catalog assertions.

Validation:

- `go build ./pkg/frontend ./pkg/sql/compile ./pkg/sql/plan`
- `go vet ./pkg/frontend ./pkg/sql/compile ./pkg/sql/plan ./pkg/tests/issues`
- full `pkg/frontend`, `pkg/sql/compile`, and `pkg/sql/plan` tests
- embedded five-path regression, normal and `-race`
- preflight: `PASS review=PASS validation=PENDING`

QA handoff required: yes. Please verify all five quoted-identifier paths in a
deployed test environment before closing the issue.

Approved by: @XuPeng-SH
VioletQwQ-0 added a commit to VioletQwQ-0/matrixone that referenced this pull request Sep 17, 2026
Valid table identifiers containing an embedded backtick crossed three different
representation boundaries incorrectly:

- table CLONE/Data Branch SQL-escaped the decoded identifier before semantic
catalog lookup, resolving a different table name;
- database CLONE/Data Branch interpolated catalog names into `SHOW CREATE
TABLE` without identifier escaping;
- DROP DATABASE interpolated relation names into its internal `DROP TABLE`
without identifier escaping.

This change keeps decoded names unchanged for engine lookup and quotes them only
at SQL-generation boundaries. The embedded regression independently exercises
ordinary table clone, table branch, database branch, database clone, and DROP
DATABASE, including terminal row/catalog assertions.

Validation:

- `go build ./pkg/frontend ./pkg/sql/compile ./pkg/sql/plan`
- `go vet ./pkg/frontend ./pkg/sql/compile ./pkg/sql/plan ./pkg/tests/issues`
- full `pkg/frontend`, `pkg/sql/compile`, and `pkg/sql/plan` tests
- embedded five-path regression, normal and `-race`
- preflight: `PASS review=PASS validation=PENDING`

QA handoff required: yes. Please verify all five quoted-identifier paths in a
deployed test environment before closing the issue.

Approved by: @XuPeng-SH
VioletQwQ-0 added a commit to VioletQwQ-0/matrixone that referenced this pull request Sep 17, 2026
Valid table identifiers containing an embedded backtick crossed three different
representation boundaries incorrectly:

- table CLONE/Data Branch SQL-escaped the decoded identifier before semantic
catalog lookup, resolving a different table name;
- database CLONE/Data Branch interpolated catalog names into `SHOW CREATE
TABLE` without identifier escaping;
- DROP DATABASE interpolated relation names into its internal `DROP TABLE`
without identifier escaping.

This change keeps decoded names unchanged for engine lookup and quotes them only
at SQL-generation boundaries. The embedded regression independently exercises
ordinary table clone, table branch, database branch, database clone, and DROP
DATABASE, including terminal row/catalog assertions.

Validation:

- `go build ./pkg/frontend ./pkg/sql/compile ./pkg/sql/plan`
- `go vet ./pkg/frontend ./pkg/sql/compile ./pkg/sql/plan ./pkg/tests/issues`
- full `pkg/frontend`, `pkg/sql/compile`, and `pkg/sql/plan` tests
- embedded five-path regression, normal and `-race`
- preflight: `PASS review=PASS validation=PENDING`

QA handoff required: yes. Please verify all five quoted-identifier paths in a
deployed test environment before closing the issue.

Approved by: @XuPeng-SH

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/bug Something isn't working size/M Denotes a PR that changes [100,499] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants