Changeset: fa8cb615a7ec for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=fa8cb615a7ec
Added Files:
        monetdb5/optimizer/Tests/commonTerms.stable.err
        monetdb5/optimizer/Tests/commonTerms.stable.out
Modified Files:
        monetdb5/optimizer/Tests/commonTerms.malC
Branch: default
Log Message:

User inspired test case


diffs (173 lines):

diff --git a/monetdb5/optimizer/Tests/commonTerms.malC 
b/monetdb5/optimizer/Tests/commonTerms.malC
--- a/monetdb5/optimizer/Tests/commonTerms.malC
+++ b/monetdb5/optimizer/Tests/commonTerms.malC
@@ -1,21 +1,13 @@
 # handle the duplicates in this code block
 function user.s4_1():void;
-barrier X_213:bit := language.dataflow();
- X_122:bat[:str] := bat.new(nil:str);
- X_128:bat[:int] := bat.new(nil:int);
- X_126:bat[:int] := bat.new(nil:int);
- X_125:bat[:str] := bat.new(nil:str);
- X_124:bat[:str] := bat.new(nil:str);
- X_111:bat[:lng] := bat.new(nil:lng);
- (X_115:bat[:lng], X_116:bat[:oid], X_117:bat[:oid]) := algebra.sort(X_111, 
false:bit, false:bit, false:bit);
- X_42:bat[:lng] := bat.new(nil:lng);
  X_41:bat[:timestamp] := bat.new(nil:timestamp);
- X_46:bat[:bit] := batcalc.>=(X_41, "2018-11-04 09:00:00.000":timestamp);
+ X_46:bat[:bit] := batcalc.>=(X_41, "2019-03-10 10:00:00.000":timestamp);
  X_51:bat[:bit] := batcalc.<(X_41, "2019-03-10 10:00:00.000":timestamp);
  X_53:bat[:bit] := batcalc.and(X_46, X_51);
  X_55:bat[:bit] := batcalc.isnil(X_53);
  X_66:bat[:bit] := batcalc.ifthenelse(X_55, false:bit, X_53);
  X_69:bat[:timestamp] := mal.manifold("mtime":str, 
"timestamp_add_msec_interval":str, X_41, -28800000:lng);
+
  X_74:bat[:bit] := batcalc.>=(X_41, "2019-03-10 10:00:00.000":timestamp);
  X_77:bat[:bit] := batcalc.<(X_41, "2019-11-03 09:00:00.000":timestamp);
  X_78:bat[:bit] := batcalc.and(X_74, X_77);
@@ -25,36 +17,16 @@ barrier X_213:bit := language.dataflow()
  X_98:bat[:timestamp] := batcalc.ifthenelse(X_93, X_95, X_69);
  X_99:bat[:timestamp] := batcalc.ifthenelse(X_66, X_69, X_98);
  X_102:bat[:str] := mal.manifold("mtime":str, "timestamp_to_str":str, X_99, 
"%W":str);
- (X_105:bat[:oid], C_106:bat[:oid], X_107:bat[:lng]) := group.group(X_102);
- (X_108:bat[:oid], C_109:bat[:oid], X_110:bat[:lng]) := 
group.subgroupdone(X_42, X_105);
- X_113:bat[:lng] := aggr.subcount(X_108, X_108, C_109, false:bit);
- X_120:bat[:str] := algebra.projectionpath(X_116, C_109, X_102);
- X_119:bat[:lng] := algebra.projection(X_116, X_113);
- X_118:bat[:lng] := bat.new(nil:lng);
- X_129:bat[:str] := bat.append(X_122, "sys.L2":str);
- X_131:bat[:str] := bat.append(X_124, "priority":str);
- X_133:bat[:str] := bat.append(X_125, "bigint":str);
- X_135:bat[:int] := bat.append(X_126, 64:int);
- X_137:bat[:int] := bat.append(X_128, 0:int);
- X_139:bat[:str] := bat.append(X_129, "sys.L5":str);
- X_141:bat[:str] := bat.append(X_131, "count_of_1165461084":str);
- X_143:bat[:str] := bat.append(X_133, "bigint":str);
- X_144:bat[:int] := bat.append(X_135, 64:int);
- X_145:bat[:int] := bat.append(X_137, 0:int);
- X_146:bat[:str] := bat.append(X_139, "sys.L7":str);
- X_148:bat[:str] := bat.append(X_141, "timeref":str);
- X_150:bat[:str] := bat.append(X_143, "clob":str);
- X_152:bat[:int] := bat.append(X_144, 0:int);
- X_153:bat[:int] := bat.append(X_145, 0:int);
- language.pass(X_53);
- language.pass(X_78);
- language.pass(X_41);
- language.pass(X_69);
- language.pass(X_108);
- language.pass(C_109);
- language.pass(X_102);
- language.pass(X_116);
-exit X_213:bit;
+
+ X_1851:bat[:bit] := batcalc.<(X_41:bat[:timestamp], "2006-10-29 
09:00:00.000":timestamp);
+ X_1863:bat[:bit] := batcalc.<(X_41:bat[:timestamp], "2006-10-29 
09:00:00.000":timestamp);
+ X_1873:bat[:bit] := batcalc.>=(X_41:bat[:timestamp], "2006-10-29 
09:00:00.000":timestamp);
+ X_648:bat[:bit] := batcalc.<(X_41:bat[:timestamp], "2006-10-29 
09:00:00.000":timestamp);
+ X_660:bat[:bit] := batcalc.<(X_41:bat[:timestamp], "2006-10-29 
09:00:00.000":timestamp);
+ X_669:bat[:bit] := batcalc.>=(X_41:bat[:timestamp], "2006-10-29 
09:00:00.000":timestamp);
+
 end user.s4_1;
 
-optimizer.commonTerms("optimizer","commonTerms");
+optimizer.multiplex("user","s4_1");
+optimizer.commonTerms("user","s4_1");
+mdb.List("user","s4_1");
diff --git a/monetdb5/optimizer/Tests/commonTerms.stable.err 
b/monetdb5/optimizer/Tests/commonTerms.stable.err
new file mode 100644
--- /dev/null
+++ b/monetdb5/optimizer/Tests/commonTerms.stable.err
@@ -0,0 +1,33 @@
+stderr of test 'commonTerms` in directory 'monetdb5/optimizer` itself:
+
+
+# 13:56:12 >  
+# 13:56:12 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=34759" "--set" 
"mapi_usock=/var/tmp/mtest-15937/.s.monetdb.34759" "--set" "monet_prompt=" 
"--forcemito" 
"--dbpath=/export/scratch1/mk/branches/default//Linux/var/MonetDB/mTests_monetdb5_optimizer"
 "--set" "monet_daemon=yes" "--set" "embedded_c=true"
+# 13:56:12 >  
+
+# builtin opt  gdk_dbpath = 
/export/scratch1/mk/branches/default//Linux/var/monetdb5/dbfarm/demo
+# builtin opt  monet_prompt = >
+# builtin opt  monet_daemon = no
+# builtin opt  mapi_port = 50000
+# builtin opt  mapi_open = false
+# builtin opt  mapi_autosense = false
+# builtin opt  sql_optimizer = default_pipe
+# builtin opt  sql_debug = 0
+# cmdline opt  gdk_nr_threads = 0
+# cmdline opt  mapi_open = true
+# cmdline opt  mapi_port = 34759
+# cmdline opt  mapi_usock = /var/tmp/mtest-15937/.s.monetdb.34759
+# cmdline opt  monet_prompt = 
+# cmdline opt  gdk_dbpath = 
/export/scratch1/mk/branches/default//Linux/var/MonetDB/mTests_monetdb5_optimizer
+# cmdline opt  monet_daemon = yes
+# cmdline opt  embedded_c = true
+
+# 13:56:12 >  
+# 13:56:12 >  "mclient" "-lmal" "-ftest" "-tnone" "-Eutf-8" 
"--host=/var/tmp/mtest-15937" "--port=34759"
+# 13:56:12 >  
+
+
+# 13:56:12 >  
+# 13:56:12 >  "Done."
+# 13:56:12 >  
+
diff --git a/monetdb5/optimizer/Tests/commonTerms.stable.out 
b/monetdb5/optimizer/Tests/commonTerms.stable.out
new file mode 100644
--- /dev/null
+++ b/monetdb5/optimizer/Tests/commonTerms.stable.out
@@ -0,0 +1,55 @@
+stdout of test 'commonTerms` in directory 'monetdb5/optimizer` itself:
+
+
+# 13:56:12 >  
+# 13:56:12 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=34759" "--set" 
"mapi_usock=/var/tmp/mtest-15937/.s.monetdb.34759" "--set" "monet_prompt=" 
"--forcemito" 
"--dbpath=/export/scratch1/mk/branches/default//Linux/var/MonetDB/mTests_monetdb5_optimizer"
 "--set" "monet_daemon=yes" "--set" "embedded_c=true"
+# 13:56:12 >  
+
+# MonetDB 5 server v11.34.0 (hg id: 30ab14e79058+)
+# This is an unreleased version
+# Serving database 'mTests_monetdb5_optimizer', using 4 threads
+# Compiled for x86_64-pc-linux-gnu/64bit with 128bit integers
+# Found 31.307 GiB available main-memory.
+# Copyright (c) 1993 - July 2008 CWI.
+# Copyright (c) August 2008 - 2019 MonetDB B.V., all rights reserved
+# Visit https://www.monetdb.org/ for further information
+# Listening for connection requests on mapi:monetdb://toke.da.cwi.nl:34759/
+# Listening for UNIX domain connection requests on 
mapi:monetdb:///var/tmp/mtest-15937/.s.monetdb.34759
+# MonetDB/GIS module loaded
+# MonetDB/SQL module loaded
+
+# 13:56:12 >  
+# 13:56:12 >  "mclient" "-lmal" "-ftest" "-tnone" "-Eutf-8" 
"--host=/var/tmp/mtest-15937" "--port=34759"
+# 13:56:12 >  
+
+function user.s4_1():void;                     #[0] (0)  0 
+    X_41:bat[:timestamp] := bat.new(nil:timestamp);    #[1] (0) CMDBATnew 1 <- 
2 
+    X_46:bat[:bit] := batcalc.>=(X_41:bat[:timestamp], "2019-03-10 
10:00:00.000":timestamp);   #[2] (0) CMDbatGE 3 <- 1 4 
+    X_51:bat[:bit] := batcalc.<(X_41:bat[:timestamp], "2019-03-10 
10:00:00.000":timestamp);    #[3] (0) CMDbatLT 5 <- 1 4 
+    X_53:bat[:bit] := batcalc.and(X_46:bat[:bit], X_51:bat[:bit]);     #[4] 
(0) CMDbatAND 6 <- 3 5 
+    X_55:bat[:bit] := batcalc.isnil(X_53:bat[:bit]);   #[5] (0) CMDbatISNIL 7 
<- 6 
+    X_66:bat[:bit] := batcalc.ifthenelse(X_55:bat[:bit], false:bit, 
X_53:bat[:bit]);   #[6] (0) CMDifthen 8 <- 7 9 6 
+    X_69:bat[:timestamp] := mal.manifold("mtime":str, 
"timestamp_add_msec_interval":str, X_41:bat[:timestamp], -28800000:lng); #[7] 
(0) MANIFOLDevaluate 10 <- 11 12 1 13 
+    X_74:bat[:bit] := X_46:bat[:bit];          #[8] (0)  14 <- 3 
+    X_77:bat[:bit] := batcalc.<(X_41:bat[:timestamp], "2019-11-03 
09:00:00.000":timestamp);    #[9] (0) CMDbatLT 15 <- 1 16 
+    X_78:bat[:bit] := batcalc.and(X_46:bat[:bit], X_77:bat[:bit]);     #[10] 
(0) CMDbatAND 17 <- 3 15 
+    X_79:bat[:bit] := batcalc.isnil(X_78:bat[:bit]);   #[11] (0) CMDbatISNIL 
18 <- 17 
+    X_93:bat[:bit] := batcalc.ifthenelse(X_79:bat[:bit], false:bit, 
X_78:bat[:bit]);   #[12] (0) CMDifthen 19 <- 18 9 17 
+    X_95:bat[:timestamp] := mal.manifold("mtime":str, 
"timestamp_add_msec_interval":str, X_41:bat[:timestamp], -25200000:lng); #[13] 
(0) MANIFOLDevaluate 20 <- 11 12 1 21 
+    X_98:bat[:timestamp] := batcalc.ifthenelse(X_93:bat[:bit], 
X_95:bat[:timestamp], X_69:bat[:timestamp]);    #[14] (0) CMDifthen 22 <- 19 20 
10 
+    X_99:bat[:timestamp] := batcalc.ifthenelse(X_66:bat[:bit], 
X_69:bat[:timestamp], X_98:bat[:timestamp]);    #[15] (0) CMDifthen 23 <- 8 10 
22 
+    X_102:bat[:str] := mal.manifold("mtime":str, "timestamp_to_str":str, 
X_99:bat[:timestamp], "%W":str);      #[16] (0) MANIFOLDevaluate 24 <- 11 25 23 
26 
+    X_1851:bat[:bit] := batcalc.<(X_41:bat[:timestamp], "2006-10-29 
09:00:00.000":timestamp);  #[17] (0) CMDbatLT 27 <- 1 28 
+    X_1863:bat[:bit] := X_1851:bat[:bit];      #[18] (0)  29 <- 27 
+    X_1873:bat[:bit] := batcalc.>=(X_41:bat[:timestamp], "2006-10-29 
09:00:00.000":timestamp); #[19] (0) CMDbatGE 30 <- 1 28 
+    X_648:bat[:bit] := X_1851:bat[:bit];       #[20] (0)  31 <- 27 
+    X_660:bat[:bit] := X_1851:bat[:bit];       #[21] (0)  32 <- 27 
+    X_669:bat[:bit] := X_1873:bat[:bit];       #[22] (0)  33 <- 30 
+end user.s4_1;                                 #[23] (0)  
+#multiplex            actions= 0 time=1 usec 
+#commonTerms          actions= 5 time=6 usec 
+
+# 13:56:12 >  
+# 13:56:12 >  "Done."
+# 13:56:12 >  
+
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to