Changeset: d2e9064665c2 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d2e9064665c2
Modified Files:
        
sql/test/BugTracker-2018/Tests/sqlitelogictest-groupby-coalesce-error-message.Bug-6608.sql
        
sql/test/BugTracker-2018/Tests/sqlitelogictest-groupby-coalesce-error-message.Bug-6608.stable.err
Branch: Aug2018
Log Message:

Correcting desired error output. Also adding some clarifying comments for the 3 
query variants.


diffs (68 lines):

diff --git 
a/sql/test/BugTracker-2018/Tests/sqlitelogictest-groupby-coalesce-error-message.Bug-6608.sql
 
b/sql/test/BugTracker-2018/Tests/sqlitelogictest-groupby-coalesce-error-message.Bug-6608.sql
--- 
a/sql/test/BugTracker-2018/Tests/sqlitelogictest-groupby-coalesce-error-message.Bug-6608.sql
+++ 
b/sql/test/BugTracker-2018/Tests/sqlitelogictest-groupby-coalesce-error-message.Bug-6608.sql
@@ -4,8 +4,11 @@ CREATE TABLE tab1(col0 INTEGER, col1 INT
 INSERT INTO tab0 VALUES (83,0,38), (26,0,79), (43,81,24);
 INSERT INTO tab1 VALUES (22,6,8), (28,57,45), (82,44,71);
 
+-- query without groupby (works ok)
 SELECT DISTINCT - COALESCE ( - 86, + cor0.col1, cor0.col1, - cor0.col0 ) AS 
col2 FROM tab0 AS cor0;
+-- query with groupby giving error, but error msg "no such aggregate 
'sql_neg'" is not useful
 SELECT DISTINCT - COALESCE ( - 86, + cor0.col1, cor0.col1, - cor0.col0 ) AS 
col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0;
+-- instead it should give error as reported by next query:
 SELECT COALESCE ( - 86, + cor0.col1, cor0.col1, - cor0.col0 ) AS col2 FROM 
tab0 AS cor0 GROUP BY cor0.col2, cor0.col0;
 
 SELECT ALL + 33 * - COALESCE ( - 86, tab1.col2 ) + + col1 FROM tab1;
diff --git 
a/sql/test/BugTracker-2018/Tests/sqlitelogictest-groupby-coalesce-error-message.Bug-6608.stable.err
 
b/sql/test/BugTracker-2018/Tests/sqlitelogictest-groupby-coalesce-error-message.Bug-6608.stable.err
--- 
a/sql/test/BugTracker-2018/Tests/sqlitelogictest-groupby-coalesce-error-message.Bug-6608.stable.err
+++ 
b/sql/test/BugTracker-2018/Tests/sqlitelogictest-groupby-coalesce-error-message.Bug-6608.stable.err
@@ -32,39 +32,39 @@ MAPI  = (monetdb) /var/tmp/mtest-4323/.s
 QUERY = SELECT DISTINCT - COALESCE ( - 86, + cor0.col1, cor0.col1, - cor0.col0 
) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0;
 ERROR = !SELECT: cannot use non GROUP BY column 'cor0.col1' in query results 
without an aggregate function
 CODE  = 42000
-MAPI  = (monetdb) /var/tmp/mtest-5941/.s.monetdb.34059
+MAPI  = (monetdb) /var/tmp/mtest-4323/.s.monetdb.30108
 QUERY = SELECT COALESCE ( - 86, + cor0.col1, cor0.col1, - cor0.col0 ) AS col2 
FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0;
 ERROR = !SELECT: cannot use non GROUP BY column 'cor0.col1' in query results 
without an aggregate function
 CODE  = 42000
-MAPI  = (monetdb) /var/tmp/mtest-5941/.s.monetdb.34059
+MAPI  = (monetdb) /var/tmp/mtest-4323/.s.monetdb.30108
 QUERY = SELECT ALL + 33 * - COALESCE ( - 86, tab1.col2 ) + + col1 FROM tab1 
GROUP BY tab1.col1;
 ERROR = !SELECT: cannot use non GROUP BY column 'tab1.col2' in query results 
without an aggregate function
 CODE  = 42000
-MAPI  = (monetdb) /var/tmp/mtest-5941/.s.monetdb.34059
+MAPI  = (monetdb) /var/tmp/mtest-4323/.s.monetdb.30108
 QUERY = SELECT COALESCE ( - 86, tab1.col2 ) FROM tab1 GROUP BY tab1.col1;
 ERROR = !SELECT: cannot use non GROUP BY column 'tab1.col2' in query results 
without an aggregate function
 CODE  = 42000
-MAPI  = (monetdb) /var/tmp/mtest-5941/.s.monetdb.34059
+MAPI  = (monetdb) /var/tmp/mtest-4323/.s.monetdb.30108
 QUERY = SELECT ALL + COALESCE ( - cor0.col1, cor0.col1, 63, - cor0.col2 ) * - 
cor0.col1 AS col1 FROM tab0 cor0 GROUP BY cor0.col0, col1;
 ERROR = !SELECT: cannot use non GROUP BY column 'cor0.col2' in query results 
without an aggregate function
 CODE  = 42000
-MAPI  = (monetdb) /var/tmp/mtest-5941/.s.monetdb.34059
+MAPI  = (monetdb) /var/tmp/mtest-4323/.s.monetdb.30108
 QUERY = SELECT ALL + COALESCE ( - cor0.col1, cor0.col1, 63, cor0.col2 ) AS 
col1 FROM tab0 cor0 GROUP BY cor0.col0, col1;
 ERROR = !SELECT: cannot use non GROUP BY column 'cor0.col2' in query results 
without an aggregate function
 CODE  = 42000
-MAPI  = (monetdb) /var/tmp/mtest-5941/.s.monetdb.34059
+MAPI  = (monetdb) /var/tmp/mtest-4323/.s.monetdb.30108
 QUERY = SELECT - 38 + - tab1.col1 - tab1.col1 / COALESCE ( + 20, - tab1.col0 ) 
FROM tab1 GROUP BY tab1.col1;
 ERROR = !SELECT: cannot use non GROUP BY column 'tab1.col0' in query results 
without an aggregate function
 CODE  = 42000
-MAPI  = (monetdb) /var/tmp/mtest-5941/.s.monetdb.34059
+MAPI  = (monetdb) /var/tmp/mtest-4323/.s.monetdb.30108
 QUERY = SELECT COALESCE ( + 20, tab1.col0 ) FROM tab1 GROUP BY tab1.col1;
 ERROR = !SELECT: cannot use non GROUP BY column 'tab1.col0' in query results 
without an aggregate function
 CODE  = 42000
-MAPI  = (monetdb) /var/tmp/mtest-5941/.s.monetdb.34059
+MAPI  = (monetdb) /var/tmp/mtest-4323/.s.monetdb.30108
 QUERY = SELECT DISTINCT COALESCE ( - 82, - cor0.col0, - CAST ( NULL AS INTEGER 
) ) / - 70 FROM tab0 AS cor0 GROUP BY cor0.col2;
-QUERY = SELECT DISTINCT COALESCE ( - 82, cor0.col0, - CAST ( NULL AS INTEGER ) 
) FROM tab0 AS cor0 GROUP BY cor0.col2;
+ERROR = !SELECT: cannot use non GROUP BY column 'cor0.col0' in query results 
without an aggregate function
 CODE  = 42000
-MAPI  = (monetdb) /var/tmp/mtest-5941/.s.monetdb.34059
+MAPI  = (monetdb) /var/tmp/mtest-4323/.s.monetdb.30108
 QUERY = SELECT DISTINCT COALESCE ( - 82, cor0.col0, - CAST ( NULL AS INTEGER ) 
) FROM tab0 AS cor0 GROUP BY cor0.col2;
 ERROR = !SELECT: cannot use non GROUP BY column 'cor0.col0' in query results 
without an aggregate function
 CODE  = 42000
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to