Repository navigation
fix(parser): support quoted wildcards in DESCRIBE shortcuts - #32339
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 discussion changed before publication; a fresh contextual review is queued. |
iamlinjunhong
left a comment
There was a problem hiding this comment.
Reviewed exact head 3daa27708f430be660bc4c48ebde2539f6337bf2 against main@5e024527f7d30e9cbd52c16a365fce24c91a3afe. No confirmed correctness regression was found. One non-blocking coverage finding remains, so this first review is COMMENT.
- [P2] Add public SQL regression coverage for the quoted shortcut (
pkg/sql/plan/build_show_desc_oracle_test.go:476). The new test builds a plan and evaluates an extracted predicate against synthetic column names; it does not execute the complete statement through the frontend/catalog/result path. The existingtest/distributed/cases/ddl/bvt_desc_col_filter_30890.sqlcovers backtick patterns but contains no quoted shortcut. Thus the exact public syntax rejected in the issue's QA reproduction still has no service-level regression oracle. Extend that existing BVT with quoted shortcut patterns and expected rows, including a no-match control, and run it in normal comparison mode. This also satisfies the repository testing contract's public-path requirement for SQL-visible changes.
Verification: regenerated the entire parser with this head's repository goyacc; it matches the committed file after temporary-path normalization, with zero shift/reduce or reduce/reduce conflicts. git diff --check and the prescribed PR artifact check passed. Local functional tests were not rerun; the supplied CI results and the PR's reported parser/planner runs were reused as review evidence. No service run was performed in this review.
CI is not uniformly passing: the supplied 29 checks contain 13 success, 14 skipped, and 2 neutral results; none are failed or pending. CI Required passed. Skipped and neutral checks are not counted as passed.
Previous-review reconciliation was skipped because this is the first review and the supplied reviews and inline comments are empty. Race, topology, upgrade, and performance runs were omitted because this patch only adds a sequential grammar alternative producing the existing SHOW COLUMNS LIKE AST and introduces no corresponding lifecycle, protocol, persistence, or scale change.
|
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: 3daa27708f430be660bc4c48ebde2539f6337bf2
Assessment: request_changes
The implementation directly reuses SHOW COLUMNS LIKE. The existing coverage concern remains blocking under the repository’s required public-path testing contract.
Model: gpt-6.1-sol / max
Session: 01a1a004-90c3-73b1-acc9-3d4636452003 · slot 0 · generation 0
- P2
pkg/sql/plan/build_show_desc_oracle_test.go:476: The quoted shortcut, such as DESC t 'v%', changes a public SQL error/result contract, but this regression only evaluates an extracted plan predicate.
Impact: Required frontend validation remains incomplete. Extend test/distributed/cases/ddl/bvt_desc_col_filter_30890.sql and its expected result with a quoted-pattern success and no-match control, then run the case through a real frontend in normal comparison mode.
Evidence: .agents/skills/mo-dev/references/testing-contract.md:25,35,144 requires public-path proof. Existing BVT covers identifier/backtick shortcuts; the added tests stop at parser/planner/expression execution, and the PR reports no new service smoke. Review 5803083521 identifies the same gap; its non-blocking label supplies no exception to the unchanged requirement.
Validation:
-
Reviewed all four changed files, affected consumers, all five discussion entries and complete linked issue context.
-
Receipt checks/1793981630608465342-3.json records source/evidence audit exit 0 at the frozen clean head: diff check passes, all 2,053 existing generated actions are preserved, and the sole new action matches the grammar. Logs retained.
-
Reused supplied same-head regeneration and author/CI evidence. Frozen CI has 13 successful, 14 skipped and 2 neutral checks; none failed or pending.
Limitations:
-
No independent product test or frontend run; local_validation is empty and raw author runtime logs were not supplied.
-
The finding concerns missing required validation, not a demonstrated implementation failure.
3daa277 to
f0b2ea5
Compare
…rixorigin#30890) Cover the quoted-wildcard DESCRIBE shortcut fix with distributed BVT oracles: quoted 'v%' matches val/v_1/va1, quoted 'zz%' matches nothing, and SHOW ... LIKE with the same quoted pattern returns the identical three-row comparison set.
154b46c to
7ec9290
Compare
|
mo-bot review · Commit: Review completed. Read the assessment. |
iamlinjunhong
left a comment
There was a problem hiding this comment.
APPROVE — reviewed exact head 7ec9290b43cf6ca953e90c05840e7ac840b2a50e against main@a8d561d0d056da6f32f86653e6ca17e5d9ea6297. No confirmed in-scope findings remain.
Reviewed all eight changed files and the affected scanner, AST, planner, prepared-statement and GC fixture paths. The quoted DESC/DESCRIBE/EXPLAIN argument becomes a decoded string literal in the existing SHOW COLUMNS LIKE predicate. Ordinary identifiers and unfiltered statements retain their existing grammar paths. Prepared coverage includes tables/views, repeated execution, metadata, empty matches and missing-object recovery. The GC test adjustment uses an isolated engine, restores its pool before assertions, and preserves the terminal deletion/readability controls.
The previous coverage concern is resolved in the current code: the public BVT contains quoted matching/no-match statements and an explicit SHOW comparison, with expected rows, metadata and teardown checks. The thread remains open and contains no explicit author reply; the supplied PR conversation also contains none. The later reviews reported no additional findings. New commits and automated messages were not counted as author replies.
Independent checks: regenerated the complete parser with this head's repository goyacc; output is byte-identical, with zero shift/reduce or reduce/reduce conflicts. All existing generated semantic actions are preserved, with only the quoted-pattern action added. The prescribed PR artifact check passed. git diff --check reports two trailing-whitespace lines that follow the result fixture's existing empty-cell format; these are not findings.
Runtime validation was not rerun locally. The PR reports passing native prepared tests (2 top-level / 22 total), build/static checks, five GC controls, and the 26-statement BVT in metadata comparison and CI modes. These remain attributed author evidence; their raw runtime logs were not independently checked in this review. Additional local service, race, topology, upgrade and performance runs were skipped: the production change adds a sequential grammar arm using an existing consumer, and the fixture-only change suppresses worker dispatch on a private engine during its synchronous snapshot window. No production scheduling, storage format or distributed protocol changes.
CI is not uniformly passing in the supplied exact-head snapshot: 5 checks comprise 2 success, 1 skipped and 2 neutral, with no failed or pending checks. Iceberg adapter module tidy and Summary succeeded; Iceberg E2E Local was skipped; Mergify Merge Queue and Merge Protections were neutral. Skipped and neutral checks are not counted as passed.
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: 7ec9290b43cf6ca953e90c05840e7ac840b2a50e
Assessment: approve
Quoted shortcuts reuse scanner decoding and the existing SHOW COLUMNS LIKE consumer. Public and prepared regressions close the earlier coverage concern; the isolated GC fixture preserves real handoff/deletion behavior with reliable restoration. No actionable findings remain.
Model: gpt-6.1-sol / max
Session: 01a1a004-90c3-73b1-acc9-3d4636452003 · slot 0 · generation 0
Validation:
-
Source audit passed: all 2054 existing generated actions preserved, one added; BVT row/metadata/cleanup oracles and five-file gofmt check passed. Receipt: checks/1794298643954770297-3.json.
-
Reused supplied exact-head regeneration verification and attributed author prepared-protocol, normal-comparison BVT, GC-control, build and static-check results.
-
All eight source fingerprints, fourteen discussion keys and command/exit/log receipts reconciled; source unchanged. Final receipt: checks/1794298831274688283-3.json.
-
git diff --check exited 2 for two result-fixture whitespace lines following the existing empty-cell format; retained as nonblocking warnings, not a pass.
Limitations:
-
No fresh local product/native/frontend execution or parser regeneration; raw author runtime logs were unavailable. Reported protocol tests used a private port-lease overlay.
-
Frozen CI contains two successes, one skipped and two neutral checks, with no product-test coverage established.
✅ Merged into
|
What type of PR is this?
Which issue(s) this PR fixes:
Fixes #30890
What this PR does / why we need it:
Add the missing quoted-string grammar arm for DESC/DESCRIBE/EXPLAIN table shortcuts. The decoded pattern now reaches the existing
ShowColumns.Likeconsumer, matchingSHOW COLUMNS FROM t LIKE 'pattern'and preserving no-match behavior, catalog visibility, metadata, and ordinary identifier shortcuts.Regression coverage includes direct/prepared AST parity and trailing-token rejection; native prepared statements for tables and views, repeated execution and metadata, empty matches, and error 1146 followed by connection reuse. The public BVT has 26 SQL statements in total, including 3 added quoted-pattern controls.
The CI regression fixture temporarily disables dispatch on its isolated test engine while checking the real GC handoff state, then restores the pool on every exit. Manual terminal drains, physical-deletion checks and borrowed-object readability checks remain in place.
Validation:
make buildalso exited 0.-n -gmode. Both rounds had zero failures or ignored cases. Database cleanup was verified after each round, and the service was stopped and reaped in the same foreground invocation. The-nround does not prove metadata.Local incremental SCA commands
The commands used CGo and the worktree's native include/link environment with unchanged repository configuration.