flux-pr-1628
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 does not implement the core ClickHouse `INSERT ... SETTINGS ... FORMAT ... <input data>` behavior. It parses `SETTINGS`/`FORMAT` only at the end of `INSERT` parsing (after source/query), so statements like `INSERT INTO tbl SETTINGS ... FORMAT JSONEachRow {...}` are not handled correctly. It also reuses `FormatClause` (identifier/null only) instead of supporting input format payload expressions after `FORMAT`, so non-standard input data forms (e.g., JSONEachRow rows) cannot be parsed/round-tripped as intended.
Code Review
The patch only partially addresses the feature and misses the core ClickHouse INSERT FORMAT/SETTINGS syntax and AST representation needed for correct parsing and round-tripping.
The parser reads settings/format only after parsing source/on/returning, so it does not support the intended ClickHouse form where SETTINGS/FORMAT appear directly after table/columns (including FORMAT-based input statements without a SELECT/VALUES query).
The patch uses FormatClause (identifier/null) for INSERT instead of an input-format clause that can carry values/expressions, so statements like FORMAT JSONEachRow followed by data expressions cannot be represented or round-tripped.
parse_settings is invoked unconditionally and FORMAT parsing is enabled for GenericDialect as well as ClickHouse, which can change behavior outside intended ClickHouse-only support.