flux-pr-1649
sqlparser-rs (Rust) · W2 · GPT-5.3 Codex
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
codex · partial order onlyprovider-native trajectory captured; validation and decision steps are appended with coarse ordering only
Quality
Equivalence Reasoning
behavioral
The patch adds `TRY/CATCH` modifiers, but it does not preserve `END TRY`/`END CATCH` as `END` syntax in the AST/formatter (it normalizes to `COMMIT TRY/CATCH`), and it also changes `COMMIT` parsing to accept `TRY/CATCH` directly. The intended change is support for MS-SQL `BEGIN ...` and `END ...` TRY/CATCH blocks, with distinct handling of `END` statements.
Code Review
The patch only partially addresses the goal and likely does not satisfy the intended change: it parses TRY/CATCH but conflates END with COMMIT, emits COMMIT for END forms, and introduces unsupported COMMIT TRY/CATCH behavior.
The AST no longer records whether the statement was END vs COMMIT, and display always emits COMMIT with optional modifier, so END TRY/CATCH cannot round-trip correctly as END TRY/CATCH.
parse_commit now applies TRY/CATCH parsing, allowing COMMIT TRY/COMMIT CATCH, which is outside the intended change (BEGIN/END TRY/CATCH) and broadens grammar in a likely invalid way.
TRY/CATCH modifier parsing is gated by concrete dialect type checks (MsSqlDialect | GenericDialect) rather than dialect trait capabilities, which can mis-handle custom dialects and weakens extension behavior.