flux-pr-1604
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 a `from_before_set` flag and rendering logic, but it likely misses a core parsing fix: `FROM` is not reserved as a table-alias blocker (gold adds it to `RESERVED_FOR_TABLE_ALIAS`). Without that, `UPDATE t1 FROM t2 SET ...` can be parsed incorrectly because `FROM` may be consumed during table parsing. It also gates pre-`SET` `FROM` to Snowflake only, while the intended change/gold approach supports both positions more generally in parser behavior.
Code Review
The patch appears unlikely to fully satisfy the intended change: it introduces a fragile AST representation, likely misses a required parser/keyword integration detail, and handles FROM-clause position support asymmetrically.
The parser only checks for `FROM` after `parse_table_and_joins()`. Without the companion keyword-reservation change, `FROM` can be consumed as alias context and the Snowflake form may fail to parse reliably.
Adding `from_before_set: bool` to `Statement::Update` creates representationally invalid states (`from_before_set=true` with `from=None`) and broad API churn. A dedicated enum for before/after-SET `FROM` is safer and clearer.
Pre-`SET` `FROM` is only parsed for Snowflake, and post-`SET` remains gated by a dialect list. This asymmetric handling weakens support for round-tripping both forms consistently.