Skip to content

Commit

Permalink
Add test for bug #7486
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdvm committed Mar 20, 2024
1 parent a3158e2 commit f09d561
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions sql/test/BugTracker-2024/Tests/All
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,4 @@ mvc_row_result_wrap-Bug-7481
bin_find_smallest_column-Bug-7482
rel_setop_get_statistics-Bug-7483
rel_groupby_cse-Bug-7484
rel_groupby_cse-Bug-7485
21 changes: 21 additions & 0 deletions sql/test/BugTracker-2024/Tests/rel_groupby_cse-Bug-7485.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
query I nosort
WITH x ( x ) AS ( SELECT 1 ) SELECT x FROM x GROUP BY x
----
1

statement error 42000!SELECT: cannot use non GROUP BY column 'x' in query results without an aggregate function
WITH x ( x ) AS ( SELECT 1 ) SELECT x FROM x GROUP BY x + 1
----

skipif knownfail
statement error 42000!SELECT: cannot use non GROUP BY column 'x' in query results without an aggregate function
WITH x ( x ) AS ( SELECT 1 ) SELECT x FROM x GROUP BY x + 1 , x

skipif knownfail
statement error 42000!SELECT: cannot use non GROUP BY column 'x' in query results without an aggregate function
WITH x ( x ) AS ( SELECT 1 ) SELECT ( x ) FROM x WHERE ( SELECT x FROM x GROUP BY x + 1 , x )

skipif knownfail
statement error 42000!SELECT: cannot use non GROUP BY column 'x' in query results without an aggregate function
SELECT ( WITH x ( x ) AS ( SELECT 1 ) SELECT ( x ) FROM x WHERE ( SELECT x FROM x GROUP BY x + 1 , x ) )

0 comments on commit f09d561

Please sign in to comment.