flux-pr-1839
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
stylistic
The agent patch appears to implement the required MSSQL CREATE FUNCTION behaviors: optional `AS`, inline TVF bodies with `RETURN SELECT ...`, multi-statement TVFs with `RETURNS @name TABLE(...)`, and table-return column constraints via full `parse_column_def`. It uses a different AST shape than the gold patch (`return_table` + `DataType::Table(vec![])` and `ReturnQuery`) but still targets the same functional intent.
Code Review
The patch addresses parts of MSSQL TVF parsing, but it likely does not satisfy the intended change end-to-end due to AST-model divergence, fragile RETURNS parsing logic, and reduced syntax fidelity.
The patch adds `CreateFunction.return_table` instead of extending `DataType` for named/anonymous table-valued returns. This diverges from the intended feature shape and makes return typing incomplete for SQL Server TVFs.
The parser unconditionally attempts to parse an identifier before parsing the data type, then rewinds with `prev_token` if not followed by TABLE. This can create subtle token-state issues and type-parse ambiguities.
For MSSQL, `TABLE` without parentheses is represented as `vec![]`, which loses semantic distinction between anonymous table return and explicit empty column definition and can affect formatting/round-trip fidelity.
The new `ReturnQuery` branch always renders as `RETURN ...` and does not model or print the `AS RETURN` form explicitly, reducing fidelity for MSSQL CREATE FUNCTION syntax that uses AS.