Skip to content

Commit dd6d4dc

Browse files
committed
add mysql dialect tag
1 parent f3cbecb commit dd6d4dc

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

enginetest/queries/script_queries.go

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11644,6 +11644,8 @@ select * from t1 except (
1164411644
Expected: []sql.Row{},
1164511645
},
1164611646
{
11647+
// TODO: valid query in Postgres. https://github.com/dolthub/doltgresql/issues/1796
11648+
Dialect: "mysql",
1164711649
Query: "select row_number() over () as rn from o where c_id=1",
1164811650
Expected: []sql.Row{{1}, {2}, {3}},
1164911651
},
@@ -11652,7 +11654,9 @@ select * from t1 except (
1165211654
Expected: []sql.Row{},
1165311655
},
1165411656
{
11655-
Query: "select o_id, c_id, rank() over(order by o_id) as rnk from o where c_id=1",
11657+
// TODO: valid query in Postgres. https://github.com/dolthub/doltgresql/issues/1796
11658+
Dialect: "mysql",
11659+
Query: "select o_id, c_id, rank() over(order by o_id) as rnk from o where c_id=1",
1165611660
Expected: []sql.Row{
1165711661
{10, 1, uint64(1)},
1165811662
{20, 1, uint64(2)},
@@ -11664,7 +11668,10 @@ select * from t1 except (
1166411668
Expected: []sql.Row{},
1166511669
},
1166611670
{
11667-
Query: "select ship, dense_rank() over (order by ship) as drnk from o where c_id in (1, 2) order by ship",
11671+
// TODO: valid query in Postgres. But Postgres orders nil at the end. Maybe rewrite query to filter out
11672+
// ship=null https://github.com/dolthub/doltgresql/issues/1796
11673+
Dialect: "mysql",
11674+
Query: "select ship, dense_rank() over (order by ship) as drnk from o where c_id in (1, 2) order by ship",
1166811675
Expected: []sql.Row{
1166911676
{nil, uint64(1)},
1167011677
{"CA", uint64(2)},
@@ -11680,6 +11687,8 @@ select * from t1 except (
1168011687
},
1168111688
{
1168211689
Query: "SELECT * FROM (SELECT c_id AS c_c_id, bill FROM c) sq1, LATERAL (SELECT row_number() OVER () AS rownum FROM o WHERE c_id = c_c_id) sq2 ORDER BY c_c_id, bill, rownum;",
11690+
// TODO: valid query in Postgres. https://github.com/dolthub/doltgresql/issues/1796
11691+
Dialect: "mysql",
1168311692
Expected: []sql.Row{
1168411693
{1, "CA", 1},
1168511694
{1, "CA", 2},

0 commit comments

Comments
 (0)