Skip to content

fix(parser): accept subscription as an unquoted identifier - #30126

Merged
XuPeng-SH merged 2 commits into
matrixorigin:mainfrom
iamlinjunhong:fix/30031-subscription-identifier
Oct 13, 2026
Merged

XuPeng-SH merged 2 commits into
matrixorigin:mainfrom
iamlinjunhong:fix/30031-subscription-identifier

Conversation

@iamlinjunhong

@iamlinjunhong iamlinjunhong commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

What type of PR is this?

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

Which issue(s) this PR addresses:

The reporter should verify the application after merge.

What this PR does / why we need it:

Native Documize organization lookup uses AS subscription. MatrixOne rejected this unquoted result alias because its extension keyword was excluded from the shared identifier grammar.

Accept SUBSCRIPTION as a non-reserved identifier while retaining its lexer token and existing CCPR command productions. Regenerate the parser and remove the obsolete keyword-policy exception. The same rule covers aliases and ordinary database/table/column identifiers.

Regression coverage checks explicit/implicit and mixed-case aliases, the unchanged Documize projection, quoted/plural controls, shared identifier positions, and typed CCPR commands with missing-operand rejection. A two-row SQL fixture checks Unicode/NULL values, result column metadata, COALESCE fallbacks, SQL PREPARE/EXECUTE, duplicate-key rejection, and cleanup.

Validation

Rebased head d63750f75b4f2f5ddab025a18b85479c10965891 uses official main 9d557f963f386efa17fdd2b17bda513977605762. The generated parser conflict was resolved by regenerating from the combined grammar. Upstream rank option error validation and its tests are preserved; relative to the new base, the grammar still adds only SUBSCRIPTION to non-reserved identifiers. Handwritten regression scope remains unchanged.

On macOS arm64 with Go 1.27.1:

  • Fresh repository goyacc runs completed with zero shift/reduce or reduce/reduce conflicts; two formatted generations matched byte for byte. Seven focused tests cover subscription aliases/identifiers/commands, keyword policy, snapshot diagnostics and upstream rank option control/structure rejection. All passed, along with owning MySQL/public parser packages, incremental vet and pinned golangci-lint 2.14.0 (0 issues).
  • Fresh service build on the new base passed using verified native artifacts as read-only inputs.
  • Two normal BVT comparisons on one isolated standalone service passed 18/18 each, including result metadata. Database teardown was verified between rounds; the service and temporary executable were cleaned up afterward. Exact-byte fixture/result copies accommodated the tester's dotted-directory result lookup behavior.
  • Formatting, delivery diff checks, source blob comparison and clean worktree checks passed.
  • Required gpt-6-astra medium design and final overall review passed with zero unresolved material blockers.

Earlier head f4933d7ad76df61145459c29907b85c0f9c015eb passed ordinary Ubuntu UT, SCA, shared build and both BVT lanes. UT Coverage failed before testing during Go provisioning on attempt 1 (#28652) and source checkout TLS transport on attempt 2 (recorded occurrence). Coverage and CI Required failures followed those missing-producer results; no coverage verdict was calculated. This rebase triggers fresh CI; no new-head CI success is claimed.

This preserves the scanner/parser architecture and adds no background work, storage format change or material runtime cost. Full Documize login was not exercised locally; validation targets its SQL lookup boundary.

@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 →

@matrix-meow matrix-meow added the size/XXL Denotes a PR that changes 2000+ lines label Oct 13, 2026
@mergify mergify Bot added the kind/bug Something isn't working label Oct 13, 2026
@iamlinjunhong
iamlinjunhong force-pushed the fix/30031-subscription-identifier branch from 22979aa to f4933d7 Compare October 13, 2026 17:37
@iamlinjunhong
iamlinjunhong force-pushed the fix/30031-subscription-identifier branch from e547c17 to d63750f Compare October 13, 2026 20:24
@XuPeng-SH

XuPeng-SH commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

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

Commit: d63750f75b4f2f5ddab025a18b85479c10965891

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: d63750f75b4f2f5ddab025a18b85479c10965891

Assessment: approve

Reviewed the complete six-file delta and affected callers. The shared identifier grammar fixes subscription aliases without duplicating parsing logic or breaking CCPR commands. No actionable findings remain.

Model: gpt-6-astra / xhigh

Session: 01a12d8f-7dea-77c2-a565-38d45b5564e4 · slot 0 · generation 0

Validation:

  • Two fresh parser generations matched the committed artifact byte for byte, with zero conflicts. Formatting and diff checks passed.

  • Seven focused tests and both owning parser packages passed with verified native prerequisites; owning-package execution included vet=all.

  • Real SQL wire validation passed twice on one embedded service: alias names/types, Unicode/NULL values, Documize projection, SQL/binary prepares, error recovery, identifier DDL and cleanup.

  • Reconciled source fingerprints, commands, exit receipts and retained logs. Evidence index: /home/xupeng/.local/state/mo-bot/jobs/fcbaa12932b021d604b19bed/attempt-1/review-evidence.json. Assigned source remained unchanged.

Limitations:

  • Public-path validation used the existing embedded SQL fixture; exact mo-tester/JDBC precision-and-scale rendering and full Documize login were not independently replayed.

  • Author assertions and older-head CI were not counted as verified current-head execution. Initial native setup failure was resolved before successful tests.

@mergify mergify Bot added the queued label Oct 13, 2026
@mergify

mergify Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • ✅ Entered queue — 2026-10-13 21:53 UTC · Rule: main · triggered by rule Automatic queue on approval for main
  • 🟠 Checks running · in-place
  • 🚫 Left the queue — 2026-10-13 22:13 UTC · at 14c6c4f071f9c2d9b2672455c6af640cd448f09b

This pull request spent 19 minutes 45 seconds in the queue, with no time running CI.

Reason

Pull request #30126 has been dequeued

Pull request from fork cannot be queued. This pull request comes from a fork, and Mergify needs the author's permission to update its branch.

The author needs to enable "Allow edits from maintainers" on this pull request.

Hint

You should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it.
If you do update this pull request, it will automatically be requeued once the queue conditions match again.
If you think this was a flaky issue instead, you can requeue the pull request, without updating it, by posting a @mergifyio queue comment.

Waiting for any of
  • check-neutral = CI Required
  • check-skipped = CI Required
  • check-success = CI Required
All conditions

Tick the box to put this pull request back in the merge queue (same as @mergifyio queue).

  • Requeue this pull request

@XuPeng-SH

XuPeng-SH commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

mo-bot work · mo-bot-local · superseded

Commit: 14c6c4f071f9c2d9b2672455c6af640cd448f09b

operator cleanup; artifacts preserved

This branch had an error being deployed

1 failed deployment
ci — 14c6c4f0 Deployed Oct 13, 2026 by mergify[bot]
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/XXL Denotes a PR that changes 2000+ lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants