flux-pr-1604
sqlparser-rs (Rust) · W2 · 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
codex · partial order onlyprovider-native trajectory captured; validation and decision steps are appended with coarse ordering only
Quality
Equivalence Reasoning
behavioral
The patch adds an `UpdateFrom` enum and rendering/parsing branches, but it misses a key parser fix: reserving `FROM` as a table-alias keyword. Without that, `UPDATE t1 FROM t2 SET ...` can parse `FROM` as an alias of `t1`, so Snowflake before-`SET` syntax is not reliably parsed. It also allows consuming both pre- and post-`SET` `FROM` clauses and silently keeps only the pre-`SET` one, unlike the intended behavior.
Code Review
The patch is close but likely does not fully satisfy the intended change safely: it adds pre-SET FROM support, yet introduces a major parser correctness risk by allowing both FROM positions to be consumed and then dropping one.
For Snowflake UPDATE, the code parses a pre-SET FROM and also still parses a post-SET FROM, then uses `from_before_set.or(from_after_set)`. If both appear, the second parsed FROM is discarded, yielding an AST that does not reflect the full parsed SQL.
The implementation lacks a guard like `if from_before_set.is_none()` before parsing post-SET FROM. This creates ambiguous acceptance behavior and makes invalid/mixed syntax harder to detect.