Changeset: 3fb157c95af6 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3fb157c95af6
Modified Files:
        sql/test/miscellaneous/Tests/groupby_error.sql
        sql/test/miscellaneous/Tests/groupby_error.stable.out
Branch: Nov2019
Log Message:

Queries giving wrong results in linear-hashing and default branches :(


diffs (81 lines):

diff --git a/sql/test/miscellaneous/Tests/groupby_error.sql 
b/sql/test/miscellaneous/Tests/groupby_error.sql
--- a/sql/test/miscellaneous/Tests/groupby_error.sql
+++ b/sql/test/miscellaneous/Tests/groupby_error.sql
@@ -6,10 +6,24 @@ SELECT parent."sys_id" FROM "kagami_dump
 
 DROP SCHEMA "kagami_dump" CASCADE;
 
-START TRANSACTION;
 CREATE TABLE tab0(col0 INTEGER, col1 INTEGER, col2 INTEGER);
 INSERT INTO tab0 VALUES(97,1,99), (15,81,47), (87,21,10);
+CREATE TABLE tab1(col0 INTEGER, col1 INTEGER, col2 INTEGER);
+INSERT INTO tab1 VALUES (51,14,96), (85,5,59), (91,47,68);
+
 SELECT CAST(+ col1 * - col1 AS BIGINT) AS col2 FROM tab0 GROUP BY col2, col0, 
col1 HAVING + - col0 / - AVG ( ALL + col2 ) - - - AVG ( DISTINCT + col0 ) + 
col0 IS NULL;
 SELECT DISTINCT + 40 / + + col0 AS col2 FROM tab0 GROUP BY col0, col0, col2 
HAVING NOT ( NOT + - 80 BETWEEN NULL AND + - 73 ) OR NOT ( + col0 >= - COUNT ( 
* ) + - COUNT ( DISTINCT - col0 ) );
 SELECT ALL * FROM tab0 AS cor0 WHERE col2 NOT IN ( 22, 18, CAST ( NULL AS 
INTEGER ) + - 77 );
-ROLLBACK;
+
+SELECT * FROM tab0 AS cor0 WHERE NOT - 39 <> 11; --empty
+SELECT DISTINCT * FROM tab0 WHERE NOT - - 12 <> + + 96; --empty
+SELECT * FROM tab0 AS cor0 WHERE - 52 = + 32; --empty
+SELECT ALL * FROM tab0 WHERE 68 = - + 83; --empty
+
+SELECT 11 FROM tab1 AS cor0 LEFT JOIN tab0 ON 80 = 70;
+       -- 11
+       -- 11
+       -- 11
+
+drop table tab0;
+drop table tab1;
diff --git a/sql/test/miscellaneous/Tests/groupby_error.stable.out 
b/sql/test/miscellaneous/Tests/groupby_error.stable.out
--- a/sql/test/miscellaneous/Tests/groupby_error.stable.out
+++ b/sql/test/miscellaneous/Tests/groupby_error.stable.out
@@ -71,6 +71,9 @@ stdout of test 'groupby_error` in direct
 #CREATE TABLE tab0(col0 INTEGER, col1 INTEGER, col2 INTEGER);
 #INSERT INTO tab0 VALUES(97,1,99), (15,81,47), (87,21,10);
 [ 3    ]
+#CREATE TABLE tab1(col0 INTEGER, col1 INTEGER, col2 INTEGER);
+#INSERT INTO tab1 VALUES (51,14,96), (85,5,59), (91,47,68);
+[ 3    ]
 #SELECT CAST(+ col1 * - col1 AS BIGINT) AS col2 FROM tab0 GROUP BY col2, col0, 
col1 HAVING + - col0 / - AVG ( ALL + col2 ) - - - AVG ( DISTINCT + col0 ) + 
col0 IS NULL;
 % sys.L2 # table_name
 % col2 # name
@@ -86,7 +89,36 @@ stdout of test 'groupby_error` in direct
 % col0,        col1,   col2 # name
 % int, int,    int # type
 % 1,   1,      1 # length
-#ROLLBACK;
+#SELECT * FROM tab0 AS cor0 WHERE NOT - 39 <> 11; --empty
+% sys.cor0,    sys.cor0,       sys.cor0 # table_name
+% col0,        col1,   col2 # name
+% int, int,    int # type
+% 1,   1,      1 # length
+#SELECT DISTINCT * FROM tab0 WHERE NOT - - 12 <> + + 96; --empty
+% sys.tab0,    sys.tab0,       sys.tab0 # table_name
+% col0,        col1,   col2 # name
+% int, int,    int # type
+% 1,   1,      1 # length
+#SELECT * FROM tab0 AS cor0 WHERE - 52 = + 32; --empty
+% sys.cor0,    sys.cor0,       sys.cor0 # table_name
+% col0,        col1,   col2 # name
+% int, int,    int # type
+% 1,   1,      1 # length
+#SELECT ALL * FROM tab0 WHERE 68 = - + 83; --empty
+% sys.tab0,    sys.tab0,       sys.tab0 # table_name
+% col0,        col1,   col2 # name
+% int, int,    int # type
+% 1,   1,      1 # length
+#SELECT 11 FROM tab1 AS cor0 LEFT JOIN tab0 ON 80 = 70;
+% .L3 # table_name
+% L3 # name
+% tinyint # type
+% 2 # length
+[ 11   ]
+[ 11   ]
+[ 11   ]
+#drop table tab0;
+#drop table tab1;
 
 # 10:56:47 >  
 # 10:56:47 >  "Done."
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to