Skip to content

Commit

Permalink
adding tests
Browse files Browse the repository at this point in the history
  • Loading branch information
James Cor committed Jun 14, 2024
1 parent d432e84 commit a8b3e1a
Show file tree
Hide file tree
Showing 3 changed files with 12,946 additions and 12,955 deletions.
32 changes: 32 additions & 0 deletions go/vt/sqlparser/parse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,38 @@ var (
{
input: "select a from (values row(1, 2), row('a', 'b')) as t1 (w, x) join lateral (values row(3, 4), row('c', 'd')) as t2 (y, z)",
},
{
input: "values row(1, 3), row(2, 2), row(3, 1)",
output: "select * from (values row(1, 3), row(2, 2), row(3, 1))",
},
{
input: "values (1, 3), (2, 2), (3, 1)",
output: "select * from (values row(1, 3), row(2, 2), row(3, 1))",
},
{
input: "values (1, 3), row(2, 2), (3, 1)",
output: "select * from (values row(1, 3), row(2, 2), row(3, 1))",
},
{
input: "values (1, 3), (2, 2), (3, 1) order by 1",
output: "select * from (values row(1, 3), row(2, 2), row(3, 1)) order by 1 asc",
},
{
input: "values (1, 3), (2, 2), (3, 1) order by 1 asc",
output: "select * from (values row(1, 3), row(2, 2), row(3, 1)) order by 1 asc",
},
{
input: "values (1, 3), (2, 2), (3, 1) order by 1 desc",
output: "select * from (values row(1, 3), row(2, 2), row(3, 1)) order by 1 desc",
},
{
input: "values (1, 3), (2, 2), (3, 1) limit 1",
output: "select * from (values row(1, 3), row(2, 2), row(3, 1)) limit 1",
},
{
input: "values (1, 3), (2, 2), (3, 1) order by 2 limit 2",
output: "select * from (values row(1, 3), row(2, 2), row(3, 1)) order by 2 asc limit 2",
},
{
input: "select a from t1, lateral (select b from t2) as sq",
},
Expand Down
Loading

0 comments on commit a8b3e1a

Please sign in to comment.