Changeset: 51cf0f9efd97 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=51cf0f9efd97
Modified Files:
        sql/backends/monet5/sql_statistics.c
        sql/test/BugTracker-2017/Tests/cleanup_statistics.Bug-6439.stable.out
        
sql/test/BugTracker-2017/Tests/crash_after_oidx_on_sys_statistics.Bug-6251.stable.out
        sql/test/BugTracker-2017/Tests/statistics_nils_not_eq_zero.Bug-6331.sql
        sql/test/remote/Tests/partition_elim.stable.out
        sql/test/sys-schema/Tests/check_Not_Nullable_columns.sql
        sql/test/sys-schema/Tests/check_Not_Nullable_columns.stable.out
Branch: Apr2019
Log Message:

Approve tests after recent changes.


diffs (truncated from 399 to 300 lines):

diff --git a/sql/backends/monet5/sql_statistics.c 
b/sql/backends/monet5/sql_statistics.c
--- a/sql/backends/monet5/sql_statistics.c
+++ b/sql/backends/monet5/sql_statistics.c
@@ -215,7 +215,7 @@ sql_analyze(Client cntxt, MalBlkPtr mb, 
                                                        minlen = 4;
                                                }
                                                if (tostr) {
-                                                       if ((val = 
BATmax(bn,0)) == NULL)
+                                                       if ((val = BATmax(bn, 
NULL)) == NULL)
                                                                strcpy(maxval, 
str_nil);
                                                        else {
                                                                if 
(tostr(&maxval, &maxlen, val, false) < 0) {
@@ -226,7 +226,7 @@ sql_analyze(Client cntxt, MalBlkPtr mb, 
                                                                }
                                                                GDKfree(val);
                                                        }
-                                                       if ((val = 
BATmin(bn,0)) == NULL)
+                                                       if ((val = BATmin(bn, 
NULL)) == NULL)
                                                                strcpy(minval, 
str_nil);
                                                        else {
                                                                if 
(tostr(&minval, &minlen, val, false) < 0) {
diff --git 
a/sql/test/BugTracker-2017/Tests/cleanup_statistics.Bug-6439.stable.out 
b/sql/test/BugTracker-2017/Tests/cleanup_statistics.Bug-6439.stable.out
--- a/sql/test/BugTracker-2017/Tests/cleanup_statistics.Bug-6439.stable.out
+++ b/sql/test/BugTracker-2017/Tests/cleanup_statistics.Bug-6439.stable.out
@@ -42,9 +42,9 @@ Ready.
 % sys.statistics,      sys.statistics, sys.statistics, sys.statistics, 
sys.statistics, sys.statistics, sys.statistics, sys.statistics, sys.statistics, 
sys.statistics # table_name
 % type,        width,  sample, count,  unique, nils,   minval, maxval, sorted, 
revsorted # name
 % clob,        int,    bigint, bigint, bigint, bigint, clob,   clob,   
boolean,        boolean # type
-% 7,   1,      1,      1,      1,      1,      5,      5,      5,      5 # 
length
+% 7,   1,      1,      1,      1,      1,      3,      3,      5,      5 # 
length
 [ "int",       4,      2,      2,      2,      0,      "1",    "2",    true,   
false   ]
-[ "varchar",   1,      2,      2,      2,      0,      "\"one\"",      
"\"two\"",      true,   false   ]
+[ "varchar",   1,      2,      2,      2,      0,      "one",  "two",  true,   
false   ]
 #SELECT /* column_id, */ type, width, /* stamp, */ "sample", "count", 
"unique", nils, minval, maxval, sorted, revsorted FROM sys.statistics where 
column_id not in (select id from sys.columns);
 % sys.statistics,      sys.statistics, sys.statistics, sys.statistics, 
sys.statistics, sys.statistics, sys.statistics, sys.statistics, sys.statistics, 
sys.statistics # table_name
 % type,        width,  sample, count,  unique, nils,   minval, maxval, sorted, 
revsorted # name
diff --git 
a/sql/test/BugTracker-2017/Tests/crash_after_oidx_on_sys_statistics.Bug-6251.stable.out
 
b/sql/test/BugTracker-2017/Tests/crash_after_oidx_on_sys_statistics.Bug-6251.stable.out
--- 
a/sql/test/BugTracker-2017/Tests/crash_after_oidx_on_sys_statistics.Bug-6251.stable.out
+++ 
b/sql/test/BugTracker-2017/Tests/crash_after_oidx_on_sys_statistics.Bug-6251.stable.out
@@ -89,7 +89,7 @@ Ready.
 % sys.statistics,      sys.statistics, sys.statistics, sys.statistics, 
sys.statistics, sys.statistics, sys.statistics, sys.statistics # table_name
 % type,        width,  sample, count,  unique, nils,   sorted, revsorted # name
 % clob,        int,    bigint, bigint, bigint, bigint, boolean,        boolean 
# type
-% 9,   1,      2,      2,      2,      1,      5,      5 # length
+% 9,   1,      2,      2,      2,      2,      5,      5 # length
 [ "int",       4,      12,     12,     12,     0,      true,   false   ]
 [ "clob",      1,      12,     12,     5,      0,      false,  false   ]
 [ "int",       4,      12,     12,     3,      0,      false,  false   ]
@@ -98,8 +98,8 @@ Ready.
 [ "bigint",    8,      12,     12,     1,      0,      true,   true    ]
 [ "bigint",    8,      12,     12,     1,      0,      true,   true    ]
 [ "bigint",    8,      12,     12,     1,      0,      true,   true    ]
-[ "clob",      1,      12,     12,     1,      0,      true,   true    ]
-[ "clob",      1,      12,     12,     1,      0,      true,   true    ]
+[ "clob",      1,      12,     12,     1,      12,     true,   true    ]
+[ "clob",      1,      12,     12,     1,      12,     true,   true    ]
 [ "boolean",   1,      12,     12,     1,      0,      true,   true    ]
 [ "boolean",   1,      12,     12,     1,      0,      true,   true    ]
 #CREATE ORDERED INDEX stat_oidx ON sys.statistics (width);
@@ -107,7 +107,7 @@ Ready.
 % sys.statistics,      sys.statistics, sys.statistics, sys.statistics, 
sys.statistics, sys.statistics, sys.statistics, sys.statistics # table_name
 % type,        width,  sample, count,  unique, nils,   sorted, revsorted # name
 % clob,        int,    bigint, bigint, bigint, bigint, boolean,        boolean 
# type
-% 9,   1,      2,      2,      2,      1,      5,      5 # length
+% 9,   1,      2,      2,      2,      2,      5,      5 # length
 [ "int",       4,      12,     12,     12,     0,      true,   false   ]
 [ "clob",      1,      12,     12,     5,      0,      false,  false   ]
 [ "int",       4,      12,     12,     3,      0,      false,  false   ]
@@ -116,8 +116,8 @@ Ready.
 [ "bigint",    8,      12,     12,     1,      0,      true,   true    ]
 [ "bigint",    8,      12,     12,     1,      0,      true,   true    ]
 [ "bigint",    8,      12,     12,     1,      0,      true,   true    ]
-[ "clob",      1,      12,     12,     1,      0,      true,   true    ]
-[ "clob",      1,      12,     12,     1,      0,      true,   true    ]
+[ "clob",      1,      12,     12,     1,      12,     true,   true    ]
+[ "clob",      1,      12,     12,     1,      12,     true,   true    ]
 [ "boolean",   1,      12,     12,     1,      0,      true,   true    ]
 [ "boolean",   1,      12,     12,     1,      0,      true,   true    ]
 #DELETE FROM sys.statistics;
diff --git 
a/sql/test/BugTracker-2017/Tests/statistics_nils_not_eq_zero.Bug-6331.sql 
b/sql/test/BugTracker-2017/Tests/statistics_nils_not_eq_zero.Bug-6331.sql
--- a/sql/test/BugTracker-2017/Tests/statistics_nils_not_eq_zero.Bug-6331.sql
+++ b/sql/test/BugTracker-2017/Tests/statistics_nils_not_eq_zero.Bug-6331.sql
@@ -2,18 +2,18 @@ SELECT count(*) = 0 FROM sys.statistics;
 
 ANALYZE sys;
 SELECT count(*) > 0 FROM sys.statistics WHERE nils <> 0;
-SELECT count(*) > 0 FROM sys.statistics WHERE nils <> 0 AND (minval = 'nil' OR 
maxval = 'nil');
-SELECT count(*) > 0 FROM sys.statistics WHERE count > 0 AND (minval = 'nil' OR 
maxval = 'nil');
+SELECT count(*) > 0 FROM sys.statistics WHERE nils <> 0 AND (minval IS NULL OR 
maxval IS NULL);
+SELECT count(*) > 0 FROM sys.statistics WHERE count > 0 AND (minval IS NULL OR 
maxval IS NULL);
 
 ANALYZE tmp;
 SELECT count(*) > 0 FROM sys.statistics WHERE nils <> 0;
-SELECT count(*) > 0 FROM sys.statistics WHERE nils <> 0 AND (minval = 'nil' OR 
maxval = 'nil');
-SELECT count(*) > 0 FROM sys.statistics WHERE count > 0 AND (minval = 'nil' OR 
maxval = 'nil');
+SELECT count(*) > 0 FROM sys.statistics WHERE nils <> 0 AND (minval IS NULL OR 
maxval IS NULL);
+SELECT count(*) > 0 FROM sys.statistics WHERE count > 0 AND (minval IS NULL OR 
maxval IS NULL);
 
 ANALYZE profiler;
 SELECT count(*) > 0 FROM sys.statistics WHERE nils <> 0;
-SELECT count(*) > 0 FROM sys.statistics WHERE nils <> 0 AND (minval = 'nil' OR 
maxval = 'nil');
-SELECT count(*) > 0 FROM sys.statistics WHERE count > 0 AND (minval = 'nil' OR 
maxval = 'nil');
+SELECT count(*) > 0 FROM sys.statistics WHERE nils <> 0 AND (minval IS NULL OR 
maxval IS NULL);
+SELECT count(*) > 0 FROM sys.statistics WHERE count > 0 AND (minval IS NULL OR 
maxval IS NULL);
 
 select '~BeginVariableOutput~';
 DELETE FROM sys.statistics;
diff --git a/sql/test/remote/Tests/partition_elim.stable.out 
b/sql/test/remote/Tests/partition_elim.stable.out
--- a/sql/test/remote/Tests/partition_elim.stable.out
+++ b/sql/test/remote/Tests/partition_elim.stable.out
@@ -134,7 +134,7 @@ Ready.
 % mal # name
 % clob # type
 % 130 # length
-function user.SQLanalyze():void;
+function user.main():void;
     X_5:void := querylog.define("explain select x,y from test where x between 
4.0 and 6.0;":str, "default_pipe":str, 51:int);
 barrier X_149:bit := language.dataflow();
     X_43:bat[:dbl] := bat.new(nil:dbl);
@@ -189,12 +189,13 @@ barrier X_149:bit := language.dataflow()
     language.pass(C_130:bat[:oid]);
 exit X_149:bit;
     sql.resultSet(X_68:bat[:str], X_69:bat[:str], X_71:bat[:str], 
X_72:bat[:int], X_73:bat[:int], X_46:bat[:dbl], X_49:bat[:dbl]);
-end user.SQLanalyze;
-#inline               actions= 0 time=4 usec 
-#remap                actions= 0 time=7 usec 
-#costmodel            actions= 1 time=7 usec 
-#coercion             actions= 0 time=7 usec 
-#evaluate             actions=10 time=99 usec 
+end user.main;
+#inline               actions= 0 time=1 usec 
+#remap                actions= 0 time=2 usec 
+#costmodel            actions= 1 time=2 usec 
+#coercion             actions= 0 time=2 usec 
+#aliases              actions= 6 time=9 usec 
+#evaluate             actions= 4 time=18 usec 
 #emptybind            actions= 0 time=1 usec 
 #pushselect           actions= 6 time=43 usec 
 #aliases              actions=14 time=40 usec 
@@ -220,7 +221,7 @@ end user.SQLanalyze;
 % mal # name
 % clob # type
 % 130 # length
-function user.SQLanalyze():void;
+function user.main():void;
     X_8:void := querylog.define("explain select x,y from test where x between 
(7-3) and (7-1);":str, "default_pipe":str, 61:int);
 barrier X_161:bit := language.dataflow();
     X_53:bat[:dbl] := bat.new(nil:dbl);
@@ -275,29 +276,31 @@ barrier X_161:bit := language.dataflow()
     language.pass(C_142:bat[:oid]);
 exit X_161:bit;
     sql.resultSet(X_78:bat[:str], X_79:bat[:str], X_81:bat[:str], 
X_82:bat[:int], X_83:bat[:int], X_56:bat[:dbl], X_59:bat[:dbl]);
-end user.SQLanalyze;
-#inline               actions= 0 time=4 usec 
-#remap                actions= 0 time=8 usec 
-#costmodel            actions= 1 time=6 usec 
-#coercion             actions= 8 time=47 usec 
-#evaluate             actions=20 time=154 usec 
-#emptybind            actions= 0 time=1 usec 
-#pushselect           actions= 6 time=48 usec 
-#aliases              actions=24 time=41 usec 
-#mitosis              actions=1 time=80 usec 
-#mergetable           actions= 3 time=192 usec 
-#deadcode             actions= 4 time=43 usec 
-#aliases              actions= 0 time=1 usec 
-#constants            actions= 9 time=34 usec 
-#commonTerms          actions= 0 time=24 usec 
-#projectionpath       actions= 0 time=19 usec 
-#deadcode             actions= 0 time=33 usec 
-#reorder              actions= 1 time=127 usec 
-#matpack              actions= 2 time=20 usec 
-#dataflow             actions= 1 time=111 usec 
-#multiplex            actions= 0 time=7 usec 
-#profiler             actions=1 time=6 usec 
-#candidates           actions=1 time=4 usec 
+end user.main;
+#inline               actions= 0 time=1 usec 
+#remap                actions= 0 time=2 usec 
+#costmodel            actions= 1 time=2 usec 
+#coercion             actions= 0 time=2 usec 
+#aliases              actions=12 time=10 usec 
+#evaluate             actions= 8 time=26 usec 
+#emptybind            actions= 0 time=0 usec 
+#pushselect           actions= 6 time=12 usec 
+#aliases              actions=12 time=8 usec 
+#mitosis              actions=1 time=23 usec 
+#mergetable           actions= 3 time=48 usec 
+#deadcode             actions= 4 time=12 usec 
+#aliases              actions= 0 time=0 usec 
+#constants            actions= 6 time=9 usec 
+#commonTerms          actions= 0 time=6 usec 
+#projectionpath       actions= 0 time=5 usec 
+#deadcode             actions= 0 time=9 usec 
+#reorder              actions= 1 time=29 usec 
+#matpack              actions= 2 time=5 usec 
+#dataflow             actions= 1 time=25 usec 
+#multiplex            actions= 0 time=1 usec 
+#profiler             actions= 1 time=2 usec 
+#candidates           actions= 1 time=1 usec 
+#deadcode             actions= 0 time=10 usec 
 #wlc                  actions= 0 time=0 usec 
 #garbagecollector     actions= 1 time=242 usec 
 #total                actions=26 time=1621 usec 
@@ -306,7 +309,7 @@ end user.SQLanalyze;
 % mal # name
 % clob # type
 % 151 # length
-function user.SQLanalyze():void;
+function user.main():void;
     X_9:void := querylog.define("explain select x,y from test where x between 
4.0 and 6.0 and y between 0.0 and 2.0;":str, "default_pipe":str, 40:int);
 barrier X_139:bit := language.dataflow();
     X_40:bat[:str] := bat.new(nil:str);
@@ -351,12 +354,13 @@ barrier X_139:bit := language.dataflow()
     language.pass(X_113:bat[:dbl]);
 exit X_139:bit;
     sql.resultSet(X_57:bat[:str], X_58:bat[:str], X_60:bat[:str], 
X_61:bat[:int], X_62:bat[:int], X_37:bat[:dbl], X_38:bat[:dbl]);
-end user.SQLanalyze;
-#inline               actions= 0 time=3 usec 
-#remap                actions= 0 time=6 usec 
-#costmodel            actions= 1 time=5 usec 
-#coercion             actions= 0 time=5 usec 
-#evaluate             actions=12 time=130 usec 
+end user.main;
+#inline               actions= 0 time=1 usec 
+#remap                actions= 0 time=1 usec 
+#costmodel            actions= 1 time=1 usec 
+#coercion             actions= 0 time=1 usec 
+#aliases              actions= 8 time=7 usec 
+#evaluate             actions= 4 time=17 usec 
 #emptybind            actions= 0 time=1 usec 
 #pushselect           actions= 3 time=33 usec 
 #aliases              actions=14 time=30 usec 
@@ -382,7 +386,7 @@ end user.SQLanalyze;
 % mal # name
 % clob # type
 % 164 # length
-function user.SQLanalyze():void;
+function user.main():void;
     X_11:void := querylog.define("explain select x,y from test where x between 
4.0 and 6.0 and y between (1.0-1.0) and (4.0-2.0);":str, "default_pipe":str, 
46:int);
 barrier X_147:bit := language.dataflow();
     X_46:bat[:str] := bat.new(nil:str);
@@ -427,29 +431,31 @@ barrier X_147:bit := language.dataflow()
     language.pass(X_121:bat[:dbl]);
 exit X_147:bit;
     sql.resultSet(X_63:bat[:str], X_64:bat[:str], X_66:bat[:str], 
X_67:bat[:int], X_68:bat[:int], X_43:bat[:dbl], X_44:bat[:dbl]);
-end user.SQLanalyze;
-#inline               actions= 0 time=3 usec 
-#remap                actions= 0 time=14 usec 
-#costmodel            actions= 1 time=5 usec 
-#coercion             actions= 0 time=6 usec 
-#evaluate             actions=18 time=124 usec 
-#emptybind            actions= 0 time=2 usec 
-#pushselect           actions= 3 time=35 usec 
-#aliases              actions=20 time=33 usec 
-#mitosis              actions=1 time=75 usec 
-#mergetable           actions= 4 time=183 usec 
-#deadcode             actions= 5 time=38 usec 
-#aliases              actions= 0 time=2 usec 
-#constants            actions=11 time=33 usec 
-#commonTerms          actions= 0 time=22 usec 
-#projectionpath       actions= 0 time=15 usec 
-#deadcode             actions= 0 time=28 usec 
-#reorder              actions= 1 time=108 usec 
-#matpack              actions= 2 time=22 usec 
-#dataflow             actions= 1 time=81 usec 
-#multiplex            actions= 0 time=7 usec 
-#profiler             actions=1 time=4 usec 
-#candidates           actions=1 time=4 usec 
+end user.main;
+#inline               actions= 0 time=1 usec 
+#remap                actions= 0 time=4 usec 
+#costmodel            actions= 1 time=1 usec 
+#coercion             actions= 0 time=2 usec 
+#aliases              actions=12 time=9 usec 
+#evaluate             actions= 6 time=21 usec 
+#emptybind            actions= 0 time=0 usec 
+#pushselect           actions= 3 time=10 usec 
+#aliases              actions= 8 time=6 usec 
+#mitosis              actions=1 time=22 usec 
+#mergetable           actions= 4 time=59 usec 
+#deadcode             actions= 5 time=11 usec 
+#aliases              actions= 0 time=1 usec 
+#constants            actions= 7 time=8 usec 
+#commonTerms          actions= 0 time=6 usec 
+#projectionpath       actions= 0 time=4 usec 
+#deadcode             actions= 0 time=8 usec 
+#reorder              actions= 1 time=25 usec 
+#matpack              actions= 2 time=6 usec 
+#dataflow             actions= 1 time=22 usec 
+#multiplex            actions= 0 time=1 usec 
+#profiler             actions= 1 time=2 usec 
+#candidates           actions= 1 time=1 usec 
+#deadcode             actions= 0 time=10 usec 
 #wlc                  actions= 0 time=0 usec 
 #garbagecollector     actions= 1 time=208 usec 
 #total                actions=26 time=1367 usec 
@@ -458,7 +464,7 @@ end user.SQLanalyze;
 % mal # name
 % clob # type
 % 168 # length
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to