flux-pr-1839
sqlparser-rs (Rust) · W1 · GPT-5.1 Codex Mini
Tests: unknown. 0/1 commands passed. Strength: missing.
env PATH=/root/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin cargo test --all-featuresPartial score: 0/0
Trajectory
unknown · partial order onlyCanonical trajectory missing; showing coarse derived order only.
Quality
Equivalence Reasoning
behavioral
The patch captures much of the intent (optional `AS`, named table return types, column constraints, bare `RETURN SELECT`), but it is not fully equivalent: it changes `DataType::Table` to a new `TableDataType` shape without showing corresponding updates to all existing `DataType::Table(...)` construction sites (notably the generic `parse_data_type` `TABLE` branch), which likely breaks existing behavior/build. It also does not introduce distinct `AS RETURN` body variants like the gold approach, so MSSQL `AS RETURN` round-tripping/format semantics are not fully aligned.
Code Review
The patch moves toward the requested MSSQL function coverage, but it likely does not fully satisfy the intended change because AS RETURN variants are not modeled distinctly and bare RETURN SELECT is normalized in a way that can lose expected representation/round-trip semantics.
The parser maps RETURN bodies into CreateFunctionBody::Return(Expr) instead of introducing distinct AS RETURN expression and AS RETURN SELECT variants, so the intended MSSQL forms cannot be preserved explicitly.
parse_mssql_return_expr converts SELECT/WITH returns into Expr::Subquery(parse_query), which may serialize differently from the requested bare SELECT RETURN form and can break expected round-trip behavior for inline table-valued functions.
Replacing DataType::Table(Vec<ColumnDef>) with DataType::Table(TableDataType { table_variable, columns }) introduces cross-dialect semantic coupling and a wider compatibility surface than needed for the targeted change.