You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CrossDialectParityTests.cs uses [Theory] + [MemberData] to verify the same SQL produces equivalent ASTs across all four grammar dialects. It covers basic SELECT, ORDER BY, GROUP BY/HAVING, INNER JOIN, INTERVAL window-frame bounds, and DML basics.
Waves 10 and 16 added CTE resolution and derived-table materialization. Each dialect''s integration tests exercise these independently, but no single [Theory] parses the same CTE or derived-table SQL through all four grammars and compares the resulting AST structures.
Proposed Work
Add to CrossDialectParityTests.cs:
Cte_NonRecursive_ProducesEquivalentAst — [Theory] over all 4 SelectGrammars; parses WITH x AS (SELECT a FROM tbl WHERE x > 1) SELECT a FROM x; asserts selectStmt.Ctes.Count == 1, CTE name, and selectStmt.Table is SqlCteTable.
DerivedTable_InFrom_ProducesEquivalentAst — [Theory] over all 4 SelectGrammars; parses SELECT dt.a FROM (SELECT a FROM tbl WHERE x > 1) AS dt; asserts FROM table is SqlDerivedTable with the expected inner table name.
Note: recursive CTE cross-dialect is a separate follow-up (dialect support not fully validated across all four).
Acceptance Criteria
Both [Theory] methods cover all 4 grammar dialects in their MemberData
CTE parity test asserts SqlCteTable type on the rewritten FROM reference
Derived-table parity test asserts SqlDerivedTable type on the FROM reference
All 8 new theory cases pass under dotnet test --configuration Release
Discovered by: /uber-report 2026-05-10 (SqlBuildingBlocks QA)
Context
CrossDialectParityTests.csuses[Theory]+[MemberData]to verify the same SQL produces equivalent ASTs across all four grammar dialects. It covers basic SELECT, ORDER BY, GROUP BY/HAVING, INNER JOIN, INTERVAL window-frame bounds, and DML basics.Waves 10 and 16 added CTE resolution and derived-table materialization. Each dialect''s integration tests exercise these independently, but no single
[Theory]parses the same CTE or derived-table SQL through all four grammars and compares the resulting AST structures.Proposed Work
Add to
CrossDialectParityTests.cs:Cte_NonRecursive_ProducesEquivalentAst—[Theory]over all 4SelectGrammars; parsesWITH x AS (SELECT a FROM tbl WHERE x > 1) SELECT a FROM x; assertsselectStmt.Ctes.Count == 1, CTE name, andselectStmt.TableisSqlCteTable.DerivedTable_InFrom_ProducesEquivalentAst—[Theory]over all 4SelectGrammars; parsesSELECT dt.a FROM (SELECT a FROM tbl WHERE x > 1) AS dt; asserts FROM table isSqlDerivedTablewith the expected inner table name.Note: recursive CTE cross-dialect is a separate follow-up (dialect support not fully validated across all four).
Acceptance Criteria
[Theory]methods cover all 4 grammar dialects in theirMemberDataSqlCteTabletype on the rewritten FROM referenceSqlDerivedTabletype on the FROM referencedotnet test --configuration Release