Add implicit cross join support

This commit is contained in:
go-jet 2021-05-03 18:48:15 +02:00
parent 0cba1f6401
commit 4ef0113f6b
6 changed files with 55 additions and 15 deletions

View file

@ -99,3 +99,26 @@ CROSS JOIN db.table2`)
CROSS JOIN db.table2
CROSS JOIN db.table3`)
}
func TestImplicitCROSS_JOIN(t *testing.T) {
assertDebugStatementSql(t,
SELECT(table1Col1, table2Col3).
FROM(table1, table2),
`
SELECT table1.col1 AS "table1.col1",
table2.col3 AS "table2.col3"
FROM db.table1,
db.table2;
`)
assertDebugStatementSql(t,
SELECT(
table1Col1, table2Col3,
).FROM(table1, table2, table3),
`
SELECT table1.col1 AS "table1.col1",
table2.col3 AS "table2.col3"
FROM db.table1,
db.table2,
db.table3;
`)
}