flux-pr-1649
sqlparser-rs (Rust) · W1 · GPT-5.1 Codex Mini
Tests passed. 1/1 commands passed. Strength: strong.
env PATH=/root/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin cargo test --all-featuresPartial score: 1/1
Trajectory
unknown · partial order onlyCanonical trajectory missing; showing coarse derived order only.
Quality
Equivalence Reasoning
behavioral
The patch adds parsing for `BEGIN TRY/CATCH` and `END TRY/CATCH`, but it misses key intended behavior: it does not preserve plain `END` syntax (it round-trips to `COMMIT` when no modifier), and it reuses `supports_start_transaction_modifier` for `END`, allowing inappropriate `END` modifiers (including SQLite ones) instead of restricting `END` to MS-SQL `TRY/CATCH` via a dedicated dialect capability.
Code Review
The patch partially adds TRY/CATCH tokens and MSSQL parsing, but it does not fully satisfy the intended change: END/COMMIT semantics are conflated, END support is not dialect-gated independently, and END edge behavior is inconsistent.
The AST no longer distinguishes END vs COMMIT (`Commit { chain, modifier }` only). `parse_end` can produce `modifier: None`, and display then prints `COMMIT...` for that case, so `END` is not preserved.
`parse_end` uses `parse_transaction_modifier`, which returns early based on `supports_start_transaction_modifier`. This couples END behavior to BEGIN behavior and can admit unsupported END modifiers in dialects that only support BEGIN modifiers.
When a modifier is present in `parse_end`, `chain` is hardcoded to `false` rather than parsing optional chain syntax, making behavior inconsistent with existing commit/end chain handling.