File tree Expand file tree Collapse file tree 2 files changed +11
-14
lines changed Expand file tree Collapse file tree 2 files changed +11
-14
lines changed Original file line number Diff line number Diff line change @@ -10408,24 +10408,13 @@ var BrokenErrorQueries = []QueryErrorTest{
1040810408 Query : "WITH Numbers AS ( SELECT n = 1 UNION ALL SELECT n + 1 FROM Numbers WHERE n+1 <= 10) SELECT n FROM Numbers;" ,
1040910409 ExpectedErr : sql .ErrTableNotFound ,
1041010410 },
10411-
10412- // Our behavior in when sql_mode = ONLY_FULL_GROUP_BY is inconsistent with MySQL. This is because we skip validation
10413- // for GroupBys wrapped in a Project since we are not able to validate selected expressions that get optimized as an
10414- // alias.
10415- // Relevant issue: https://github.com/dolthub/dolt/issues/4998
10416- {
10417- Query : "SELECT col0, floor(col1) FROM tab1 GROUP by col0;" ,
10418- ExpectedErr : analyzererrors .ErrValidationGroupBy ,
10419- },
10420- {
10421- Query : "SELECT floor(cor0.col1) * ceil(cor0.col0) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0" ,
10422- ExpectedErr : analyzererrors .ErrValidationGroupBy ,
10423- },
10411+ // This gives an error in MySQL but doesn't in GMS. But according to MySQL documentation, it shouldn't. Might be a
10412+ // bug in MySQL.
1042410413 {
1042510414 Query : `SELECT any_value(pk), (SELECT max(pk) FROM one_pk WHERE pk < opk.pk) AS x
1042610415 FROM one_pk opk WHERE (SELECT max(pk) FROM one_pk WHERE pk < opk.pk) > 0
1042710416 GROUP BY (SELECT max(pk) FROM one_pk WHERE pk < opk.pk) ORDER BY x` ,
10428- // No error, but we get opk.pk does not exist (aliasing error)
10417+ ExpectedErr : analyzererrors . ErrValidationGroupBy ,
1042910418 },
1043010419 // Unimplemented JSON functions
1043110420 {
Original file line number Diff line number Diff line change @@ -2942,6 +2942,14 @@ CREATE TABLE tab3 (
29422942 Query : "SELECT col0, col1 FROM tab1 GROUP by col0;" ,
29432943 ExpectedErr : analyzererrors .ErrValidationGroupBy ,
29442944 },
2945+ {
2946+ Query : "SELECT col0, floor(col1) FROM tab1 GROUP by col0;" ,
2947+ ExpectedErr : analyzererrors .ErrValidationGroupBy ,
2948+ },
2949+ {
2950+ Query : "SELECT floor(cor0.col1) * ceil(cor0.col0) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0" ,
2951+ ExpectedErr : analyzererrors .ErrValidationGroupBy ,
2952+ },
29452953 },
29462954 },
29472955 {
You can’t perform that action at this time.
0 commit comments