Repository navigation
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: fbb89c716db6a18fa47f7c631f763dfbf1211ab1
Assessment: approve
Reviewed the complete nine-file delta, callers, tests, and supplied comments. The design appropriately keeps statement boundaries in the parser, supplies raw spans for source classification, and preserves executable-comment context across SQL-mode transitions without copying the remaining query repeatedly. This restores independently parseable fragments without introducing a competing frontend splitter. Error cleanup, parser reuse, cached scheduling, and existing empty/compound-statement contracts are covered. The bounded allocation increase is justified by the correctness improvement. No actionable findings remain.
Model: gpt-6-astra / xhigh
Session: 01a12d8f-8e48-7622-ad17-b605f08450ce · slot 1 · generation 0
Validation:
-
Preflight passed. Verified 192 native inputs and 46 retained artifact hashes against compatible repository-owned build provenance. Source remained unchanged at the assigned HEAD.
-
Focused parser tests passed. An additional diagnostic matrix passed 23,536 accepted input/mode combinations, checking source spans, independently reparsed fragments, ordered AST equivalence, and continuation parsing.
-
Focused frontend tests passed for fresh/cached scheduling, source markers, rewrite policies, SQL-mode staging, and invalid spans. The embedded TestRunSQLWithFrontend passed real COM_QUERY checks across two rounds, including mode-sensitive continuations, invalid-continuation recovery, and mode restoration.
-
Three-sample base/head split benchmarks covered SELECT, INSERT, CREATE TABLE, five statements, and a 64 KiB literal. Timings were similar; the public string-split API added one allocation, including 48 bytes for ordinary single statements and 208 bytes for five statements.
-
Commands, source fingerprints, exit receipts, log hashes, probe inputs, and benchmark results are reconciled in /home/xupeng/.local/state/mo-bot/jobs/fcdc73fa6a54a1b7f29cab1b/attempt-1/validation-audit.json. One benchmark setup attempt failed before execution because its diagnostic file was absent; the corrected run passed.
Limitations:
-
Frozen CI reports success, but raw CI logs and exact-head worker validation artifacts were not supplied; local checks provide direct behavioral evidence.
-
The full linked issue #30154 text was absent. Its executable-comment failure contract, reproduced in the PR description, was reviewed and exercised.
-
Microbenchmarks measure split API costs, not end-to-end SQL throughput or concurrent workload performance.
Merge Queue Status
This pull request spent 24 minutes 42 seconds in the queue, with no time running CI. ReasonPull request #30177 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.
HintYou 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. Waiting for any of
All conditions
Tick the box to put this pull request back in the merge queue (same as
|
What type of PR is this?
Which issue(s) this PR fixes:
What this PR does / why we need it:
Executable comments can contain several parsed statements. Splitting at an internal statement delimiter currently leaves unmatched wrappers, for example
/*!50000 select 1andselect 2 */. Consumers that reparse these fragments can report a syntax error after an earlier statement has executed.Balance executable-comment wrappers at grammar-owned statement boundaries and retain each fragment's original source span. Scheduling and source classification use those spans to keep ordinary source markers attached to the correct statement, including cache hits. Existing string split APIs, single-statement comment text, compound boundaries and empty-fragment conventions are preserved.
SQLMode staged execution carries the raw unconsumed suffix and executable-comment context, then parses the next statement under the updated session mode. It balances only the emitted statement and avoids repeatedly copying the remaining query. Parser reset and error paths keep this state local to the current request.
Validation on Darwin/arm64 with Go 1.27.1:
SET sql_modereproduces error 1064, including a partial result with an ordinary prefix.Work and copying remain linear in query bytes and fragment count. Ordinary fragments remain raw string slices; additional source metadata is bounded per fragment, and wrapper copies are limited to affected fragments. No persisted or wire-format change. Remote CI is pending and is not claimed to pass. Issue verification remains with the reporter after merge.