Changeset: 26c22dfef534 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=26c22dfef534
Removed Files:
        monetdb5/mal/Tests/tst901.mal
        monetdb5/mal/Tests/tst902.mal
        monetdb5/mal/Tests/tst903.mal
        monetdb5/mal/Tests/tst904.mal
        monetdb5/mal/Tests/tst905.mal
        monetdb5/mal/Tests/tst906.mal
        monetdb5/mal/Tests/tst907.mal
        monetdb5/mal/Tests/tst908.mal
        monetdb5/mal/Tests/tst911.mal
        monetdb5/mal/Tests/tst912.mal
        monetdb5/mal/Tests/tst913.mal
        monetdb5/mal/Tests/tst920.mal
        monetdb5/mal/Tests/tst960.mal
Modified Files:
        monetdb5/mal/Tests/tst840.malC
        monetdb5/mal/Tests/tst840.stable.err
        monetdb5/mal/Tests/tst840.stable.out
        monetdb5/mal/Tests/tst903.malC
        monetdb5/mal/Tests/tst903.stable.out
Branch: default
Log Message:

MAL test revamping


diffs (truncated from 711 to 300 lines):

diff --git a/monetdb5/mal/Tests/tst840.malC b/monetdb5/mal/Tests/tst840.malC
--- a/monetdb5/mal/Tests/tst840.malC
+++ b/monetdb5/mal/Tests/tst840.malC
@@ -1,4 +1,4 @@
-# raw IO may screw up the front-end
+# old MAL parser can not deal with new lines
 function foo();
 s:= " \nline1\n\
 line2\n";
diff --git a/monetdb5/mal/Tests/tst840.stable.err 
b/monetdb5/mal/Tests/tst840.stable.err
--- a/monetdb5/mal/Tests/tst840.stable.err
+++ b/monetdb5/mal/Tests/tst840.stable.err
@@ -12,7 +12,20 @@ stderr of test 'tst840` in directory 'mo
 # 12:52:19 >  "mclient" "-lmal" "-ftest" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-13998" "--port=37997"
 # 12:52:19 >  
 
-InvalidCredentialsException:checkCredentials:invalid credentials for user 
'monetdb'
+MAPI  = (monetdb) /var/tmp/mtest-21232/.s.monetdb.32271
+QUERY = s:= " \nline1\n\
+ERROR = !SyntaxException:parseError:
+        !operator expected
+MAPI  = (monetdb) /var/tmp/mtest-21232/.s.monetdb.32271
+QUERY = line2\n";
+ERROR = !SyntaxException:parseError:line2\n";
+        !SyntaxException:parseError:    ^';' expected
+MAPI  = (monetdb) /var/tmp/mtest-21232/.s.monetdb.32271
+QUERY = end;
+ERROR = !TypeException:user.foo[2]:'s' may not be used before being initialized
+MAPI  = (monetdb) /var/tmp/mtest-21232/.s.monetdb.32271
+QUERY = user.foo();
+ERROR = !TypeException:user.main[1]:'user.foo' undefined in:     X_0:any := 
user.foo();
 
 
 # 12:52:19 >  
diff --git a/monetdb5/mal/Tests/tst840.stable.out 
b/monetdb5/mal/Tests/tst840.stable.out
--- a/monetdb5/mal/Tests/tst840.stable.out
+++ b/monetdb5/mal/Tests/tst840.stable.out
@@ -1,9 +1,9 @@
 stdout of test 'tst840` in directory 'monetdb5/mal` itself:
 
 
-# 13:50:41 >  
-# 13:50:41 >  Mtimeout -timeout 60  mserver5 
"--config=/ufs/mk/monet5/Linux/etc/monetdb5.conf" --debug=10 --set 
"monet_mod_path=/ufs/mk/monet5//Linux/lib/MonetDB5:/ufs/mk/monet5//Linux/lib/MonetDB5/lib:/ufs/mk/monet5//Linux/lib/MonetDB5/bin"
 --set "gdk_dbfarm=/ufs/mk/monet5//Linux/var/MonetDB5/dbfarm" --set 
"sql_logdir=/ufs/mk/monet5//Linux/var/MonetDB5/sql_logs" --set 
"xquery_logdir=/ufs/mk/monet5//Linux/var/MonetDB5/xquery_logs" --set 
mapi_open=true --set xrpc_open=true --set mapi_port=37742 --set xrpc_port=41258 
--set monet_prompt= --trace --dbname=mTests_src_mal  tst840.mal
-# 13:50:41 >  
+# 20:43:33 >  
+# 20:43:33 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=32271" "--set" 
"mapi_usock=/var/tmp/mtest-21232/.s.monetdb.32271" "--set" "monet_prompt=" 
"--forcemito" "--set" "mal_listing=2" 
"--dbpath=/export/scratch1/mk/default//Linux/var/MonetDB/mTests_monetdb5_mal" 
"--set" "mal_listing=2" "--set" "embedded_r=yes"
+# 20:43:33 >  
 
 # MonetDB 5 server v11.22.0
 # This is an unreleased version
@@ -13,23 +13,22 @@ stdout of test 'tst840` in directory 'mo
 # Copyright (c) 1993-July 2008 CWI.
 # Copyright (c) August 2008-2015 MonetDB B.V., all rights reserved
 # Visit http://www.monetdb.org/ for further information
-# Listening for connection requests on mapi:monetdb://vienna.da.cwi.nl:37997/
-# Listening for UNIX domain connection requests on 
mapi:monetdb:///var/tmp/mtest-13998/.s.monetdb.37997
+# Listening for connection requests on mapi:monetdb://vienna.da.cwi.nl:32271/
+# Listening for UNIX domain connection requests on 
mapi:monetdb:///var/tmp/mtest-21232/.s.monetdb.32271
 # MonetDB/GIS module loaded
 # Start processing logs sql/sql_logs version 52200
-# Start reading the write-ahead log 'sql_logs/sql/log.4'
-# Finished reading the write-ahead log 'sql_logs/sql/log.4'
 # Finished processing logs sql/sql_logs
 # MonetDB/SQL module loaded
 # MonetDB/R   module loaded
- 
+
 Ready.
 
-# 12:52:19 >  
-# 12:52:19 >  "mclient" "-lmal" "-ftest" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-13998" "--port=37997"
-# 12:52:19 >  
+# 20:43:33 >  
+# 20:43:33 >  "mclient" "-lmal" "-ftest" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-21232" "--port=32271"
+# 20:43:33 >  
 
-# 13:50:41 >  
-# 13:50:41 >  Done.
-# 13:50:41 >  
 
+# 20:43:33 >  
+# 20:43:33 >  "Done."
+# 20:43:33 >  
+
diff --git a/monetdb5/mal/Tests/tst901.mal b/monetdb5/mal/Tests/tst901.mal
deleted file mode 100644
--- a/monetdb5/mal/Tests/tst901.mal
+++ /dev/null
@@ -1,21 +0,0 @@
-# the multiplex code blocks.
-
-b:= bat.new(:oid,:int);
-barrier i:= 0:int;
-       bat.append(b,i);
-       redo i:= iterator.next(1:int,10:int);
-exit i;
-c:= algebra.copy(b);
-io.print(c);
-x:= batcalc.+(b,c);
-io.print(x);
-x:= batcalc.+(b,1:int);
-io.print(x);
-x:= batcalc.*(b,c);
-io.print(x);
-y:= batcalc.==(b,b);
-io.print(y);
-y:= batcalc.==(b,x);
-io.print(y);
-z:= batcalc.not(y);
-io.print(z);
diff --git a/monetdb5/mal/Tests/tst902.mal b/monetdb5/mal/Tests/tst902.mal
deleted file mode 100644
--- a/monetdb5/mal/Tests/tst902.mal
+++ /dev/null
@@ -1,21 +0,0 @@
-# what is the overhead of MAL in multiplex situations
-# using a BATloop !! This is 40x slower as the V4.3 multiplex implementation
-b:= bat.new(:oid,:lng);
-barrier v:= 0:lng;
-       bat.append(b,v);
-       redo v:= iterator.next(1:lng,10:lng);
-exit v;
-
-c:= algebra.copy(b);
-
-d:= bat.new(:oid,:lng);
-barrier (h,t):= iterator.new(b);
-       B1:= algebra.fetch(b,h);
-       B2:= algebra.fetch(c,h);
-       t:= B1+B2;
-       bat.append(d,t);
-       redo (h,t):= iterator.next(b);
-catch  GDKerror:str;
-exit   GDKerror;
-exit (h,t);
-io.print(d);
diff --git a/monetdb5/mal/Tests/tst903.mal b/monetdb5/mal/Tests/tst903.mal
deleted file mode 100644
--- a/monetdb5/mal/Tests/tst903.mal
+++ /dev/null
@@ -1,135 +0,0 @@
-# the multiplex code blocks.
-
-t0:= alarm.usec();
-b:= bat.new(:oid,:lng);
-
-INT_MAX := 2147483647;
-dbgmsk_restore := mdb.getDebug();
-dbgmsk_unset := 8+8388608;
-dbgmsk_keep := calc.xor(INT_MAX,dbgmsk_unset);
-dbgmsk_set := calc.and(dbgmsk_restore,dbgmsk_keep);
-mdb.setDebug(dbgmsk_set);
-
-r:= mmath.srand(0);
-barrier i:= 0:lng;
-       k:= mmath.rand();
-       l:= calc.lng(k);
-       bat.append(b,l);
-       redo i:= iterator.next(1:lng,1000000:lng);
-exit i;
-
-mdb.setDebug(dbgmsk_restore);
-
-t1:= alarm.usec();
-d0:= t1-t0;
-io.printf("#loop %d\n",d0);
-#setReadMode(b);
-mx:= aggr.max(b);
-#io.printf("max %d",mx);
-mi:= aggr.min(b);
-#io.printf(" min %d\n",mi);
-t0:= alarm.usec();
-c:= algebra.copy(b);
-t1:= alarm.usec();
-d0:= t1-t0;
-io.printf("#copy %d ",d0);
-cnt:= aggr.count(c);
-io.printf("count %d\n",cnt);
-t0:= alarm.usec();
-z:= algebra.subselect(b,25:lng,25:lng,true,true,false);
-t1:= alarm.usec();
-d0:= t1-t0;
-io.printf("#select none %d",d0);
-cnt:= aggr.count(z);
-io.printf(" count %d\n",cnt);
-t0:= alarm.usec();
-z2:= algebra.subselect(b,mi,mx,true,true,false);
-t1:= alarm.usec();
-d0:= t1-t0;
-io.printf("#select all %d",d0);
-cnt:= aggr.count(z2);
-io.printf(" count %d\n",cnt);
-rng:= mx-mi;
-r2:= rng/20;
-r3:= mi+r2;
-t0:= alarm.usec();
-z3:= algebra.subselect(b,mi,r3,true,true,false);
-t1:= alarm.usec();
-d0:= t1-t0;
-io.printf("#select 0.05 %d",d0);
-cnt:= aggr.count(z3);
-io.printf(" count %d\n",cnt);
-r2:= rng/10;
-r3:= mi+r2;
-t0:= alarm.usec();
-z4:= algebra.subselect(b,mi,r3,true,true,false);
-t1:= alarm.usec();
-d0:= t1-t0;
-io.printf("#select 0.1 %d",d0);
-cnt:= aggr.count(z4);
-io.printf(" count %d\n",cnt);
-r2:= rng/5;
-r3:= mi+r2;
-t0:= alarm.usec();
-z5:= algebra.subselect(b,mi,r3,true,true,false);
-t1:= alarm.usec();
-d0:= t1-t0;
-io.printf("#select 0.2 %d",d0);
-cnt:= aggr.count(z5);
-io.printf(" count %d\n",cnt);
-r3:= r3+r2;
-t0:= alarm.usec();
-z6:= algebra.subselect(b,mi,r3,true,true,false);
-t1:= alarm.usec();
-d0:= t1-t0;
-io.printf("#select 0.4 %d",d0);
-cnt:= aggr.count(z6);
-io.printf(" count %d\n",cnt);
-r3:= r3+r2;
-t0:= alarm.usec();
-z7:= algebra.subselect(b,mi,r3,true,true,false);
-t1:= alarm.usec();
-d0:= t1-t0;
-io.printf("#select 0.6 %d",d0);
-cnt:= aggr.count(z7);
-io.printf(" count %d\n",cnt);
-r3:= r3+r2;
-t0:= alarm.usec();
-z8:= algebra.subselect(b,mi,r3,true,true,false);
-t1:= alarm.usec();
-d0:= t1-t0;
-io.printf("#select 0.8 %d",d0);
-cnt:= aggr.count(z8);
-io.printf(" count %d\n",cnt);
-r3:= r3+r2;
-t0:= alarm.usec();
-z9:= algebra.subselect(b,mi,r3,true,true,false);
-t1:= alarm.usec();
-d0:= t1-t0;
-io.printf("#select 1.0 %d",d0);
-cnt:= aggr.count(z9);
-io.printf(" count %d\n",cnt);
-t0:= alarm.usec();
-s:= algebra.subsort(b,false,false);
-t1:= alarm.usec();
-d0:= t1-t0;
-io.printf("#head sort %d",d0);
-cnt:= aggr.count(s);
-io.printf(" count %d\n",cnt);
-cnt:= aggr.count(z9);
-
-mdb.setDebug(dbgmsk_set);
-
-t0:= alarm.usec();
-x:bat[:oid,:lng]:= mal.multiplex("calc","+",b,c);
-t1:= alarm.usec();
-
-mdb.setDebug(dbgmsk_restore);
-
-d0:= t1-t0;
-io.printf("#mal.multiplex(+) %d\n",d0);
-t0:= alarm.usec();
-x:= batcalc.+(b,c);
-t1:= alarm.usec();
-d0:= t1-t0;
-io.printf("#batcalc.+() %d\n",d0);
diff --git a/monetdb5/mal/Tests/tst903.malC b/monetdb5/mal/Tests/tst903.malC
--- a/monetdb5/mal/Tests/tst903.malC
+++ b/monetdb5/mal/Tests/tst903.malC
@@ -136,4 +136,6 @@ d0:= t1-t0;
 io.printf("#batcalc.+() %d\n",d0);
 
 end;
+optimizer.multiplex("user","foo");
+mdb.list("user","foo");
 user.foo();
diff --git a/monetdb5/mal/Tests/tst903.stable.out 
b/monetdb5/mal/Tests/tst903.stable.out
--- a/monetdb5/mal/Tests/tst903.stable.out
+++ b/monetdb5/mal/Tests/tst903.stable.out
@@ -17,10 +17,17 @@ stdout of test 'tst903` in directory 'mo
 # MonetDB/GIS module loaded
 # MonetDB/JAQL module loaded
 # MonetDB/SQL module loaded
+# MonetDB/R   module loaded
+
+Ready.
+#WARNING To speedup calc.+ a bulk operator implementation is needed
+#    x:bat[:oid,:lng] := mal.multiplex("calc":str,"+":str,b:any,c:any);
 #WARNING To speedup calc.+ a bulk operator implementation is needed
 #    x:bat[:oid,:lng] := 
mal.multiplex("calc":str,"+":str,b:bat[:oid,:lng],c:bat[:oid,:lng]);
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to