Changeset: 6bd5cb7bb624 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6bd5cb7bb624
Modified Files:
monetdb5/mal/Tests/tst007.mal
monetdb5/mal/Tests/tst007.stable.out
monetdb5/mal/Tests/tst1200.mal
monetdb5/mal/Tests/tst1200.stable.out
monetdb5/modules/mal/Tests/tokenizer00.mal
monetdb5/modules/mal/Tests/tokenizer00.stable.out
monetdb5/modules/mal/inspect.mal
monetdb5/modules/mal/mal_io.mal
monetdb5/modules/mal/remote.mal
monetdb5/modules/mal/tokenizer.mal
Branch: default
Log Message:
Adjustments of tests to :oid headed
diffs (truncated from 1618 to 300 lines):
diff --git a/monetdb5/mal/Tests/tst007.mal b/monetdb5/mal/Tests/tst007.mal
--- a/monetdb5/mal/Tests/tst007.mal
+++ b/monetdb5/mal/Tests/tst007.mal
@@ -1,7 +1,8 @@
# A collection of forloops, which should not execute
function foo();
-barrier H := batoperatie;
- Tail:= algebra.fetch(b,H);
+ b:= bat.new(:oid,:int);
+barrier H := true;
+ T:= 1;
#body
redo H;
exit H;
@@ -10,11 +11,10 @@ exit H;
# de andere loops zijn eenvoudig. 'goto' is altijd beperkt tot
# 'randen' van het blok. (redo L, leave L)
# een while loop
-barrier L := chop.hasMoreElements(b);
- H:= chop.head(b);
- v:= chop.nextElement(b);
-redo L;
-exit L;
+barrier (h,t) := iterator.new(b);
+ (h,t):= iterator.next(b);
+redo (h,t);
+exit (h,t);
#een do-while loop
entry:= true;
diff --git a/monetdb5/mal/Tests/tst007.stable.out
b/monetdb5/mal/Tests/tst007.stable.out
--- a/monetdb5/mal/Tests/tst007.stable.out
+++ b/monetdb5/mal/Tests/tst007.stable.out
@@ -5,84 +5,35 @@ stdout of test 'tst007` in directory 'ma
# 07:58:34 > Mtimeout -timeout 60 Mserver
"--config=/ufs/mk/monet5/Linux/etc/MonetDB5.conf" --debug=10 --set
"monet_mod_path=/ufs/mk/monet5/Linux/lib/MonetDB5:/ufs/mk/opensource/MonetDB/Linux/lib/MonetDB"
--set "gdk_dbfarm=/ufs/mk/monet5/Linux/var/MonetDB5/dbfarm" --set
"sql_logdir=/ufs/mk/monet5/Linux/var/MonetDB5/log" --set mapi_port=42158 --set
sql_port=55708 --set monet_prompt= --trace
"--config=/ufs/mk/monet5/src/mal/Tests/All.conf" --dbname=mTests_src_mal
tst007.mal </dev/null
# 07:58:34 >
-# Monet Database Server V4.99.19
-# Copyright (c) 1993-2004, CWI. All rights reserved.
-# Compiled for i686-redhat-linux-gnu/32bit; dynamically linked.
-# config:/ufs/mk/monet5/Linux/etc/MonetDB5.conf
-# dbfarm:/ufs/mk/monet5/Linux/var/MonetDB5/dbfarm
-# dbname:mTests_src_mal
-# Visit http://monetdb.cwi.nl/ for further information.
-## A collection of forloops, which should not execute
-#barrier H := batoperatie;
-# Tail:= bat.fetch(b,H);
-# #body
-#redo H;
-#exit H;
-#
-#
-## de andere loops zijn eenvoudig. 'goto' is altijd beperkt tot
-## 'randen' van het blok. (redo L, leave L)
-## een while loop
-#barrier L := bat.hasMoreElements(b);
-# H:= bat.head(b);
-# v:= bat.nextElement(b);
-#redo L;
-#exit L;
-#
-##een do-while loop
-# entry:= true;
-#barrier M:= entry_or_exittest;
-# entry:= false;
-# # rest
-#redo M;
-#exit M;
-#
-##een for-loop
-# i:= 1;
-#barrier N:= i<10;
-# #body
-# i:=i+1;
-#redo N;
-#exit N;
-#
-#
-## de if-then en if-then-else constructies
-#
-#barrier FT:= booleanexpr;
-# # thenpart
-#exit FT;
-#
-#barrier FTE:= booleanexpr;
-# # thenpart
-#exit FTE;
-#barrier FS:= not(FTE);
-# #elsepart
-#exit FS;
-#
-#end foo;
-!TypeException:user.foo[2]:'algebra.fetch' undefined in: Tail:any :=
algebra.fetch(b:any, H:any)
-!TypeException:user.foo[9]:'chop.hasMoreElements' undefined in: L:any :=
chop.hasMoreElements(b:any)
-!TypeException:user.foo[10]:'chop.head' undefined in: H:any := chop.head(b:any)
-!TypeException:user.foo[11]:'chop.nextElement' undefined in: v:any :=
chop.nextElement(b:any)
-!TypeException:user.foo[1]:'batoperatie' may not be used before being
initialized
-!TypeException:user.foo[2]:'b' may not be used before being initialized
-!TypeException:user.foo[9]:'b' may not be used before being initialized
+# MonetDB 5 server v11.12.0
+# This is an unreleased version
+# Serving database 'mTests_mal', using 8 threads
+# Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs dynamically
linked
+# Found 15.629 GiB available main-memory.
+# Copyright (c) 1993-July 2008 CWI.
+# Copyright (c) August 2008-2012 MonetDB B.V., all rights reserved
+# Visit http://www.monetdb.org/ for further information
+# Listening for connection requests on mapi:monetdb://vienna.ins.cwi.nl:36213/
+# MonetDB/GIS module loaded
+# MonetDB/JAQL module loaded
+# MonetDB/SQL module loaded
+# MonetDB/DataCell loaded
!TypeException:user.foo[16]:'entry_or_exittest' may not be used before being
initialized
!TypeException:user.foo[29]:'booleanexpr' may not be used before being
initialized
function user.foo():void;
-barrier H := batoperatie;
- Tail := algebra.fetch(b,H);
+ b := bat.new(:oid,:int);
+barrier H := true;
+ T := 1;
#body
redo H;
exit H;
# de andere loops zijn eenvoudig. 'goto' is altijd beperkt tot
# 'randen' van het blok. (redo L, leave L)
# een while loop
-barrier L := chop.hasMoreElements(b);
- H := chop.head(b);
- v := chop.nextElement(b);
- redo L;
-exit L;
+barrier (h,t) := iterator.new(b);
+ (h,t) := iterator.next(b);
+ redo (h,t);
+exit (h,t);
#een do-while loop
entry := true;
barrier M := entry_or_exittest;
diff --git a/monetdb5/mal/Tests/tst1200.mal b/monetdb5/mal/Tests/tst1200.mal
--- a/monetdb5/mal/Tests/tst1200.mal
+++ b/monetdb5/mal/Tests/tst1200.mal
@@ -531,22 +531,27 @@ io.print("daytime_bat,bh_a,dh_a,fh_a,hh_
#
rh_a := bat.setColumn(timestamp_bat,"timestamp");
#io.print(timestamp_bat.bat.setColumn("timestamp"),
- tzz:bat[:oid,:timezone]:= bbp.bind("timezones");
- timezones:= bat.reverse(tzz);
+ tzname:bat[:oid,:str]:= bbp.bind("timezone_name");
+ tzdef:bat[:oid,:timezone]:= bbp.bind("timezone_def");
+ tzn:= bat.reverse(tzname);
io.print("print(timezones)");
- io.print(timezones);
- sh_a:timezone := algebra.find(timezones,"Wake Island");
+ io.print(tzname,tzdef);
+ o:= algebra.find(tzn,"Wake Island");
+ sh_a:timezone := algebra.fetch(tzdef,o);
th_a:bat[:oid,:date] :=
mal.multiplex("mtime","date",timestamp_bat,sh_a);
bat.setColumn(th_a,"Wake Island");
# [date](timestamp_bat,algebra.find(timezones,"Wake
Island")).bat.setColumn("Wake Island"),
- vh_a:timezone := algebra.find(timezones,"Wake Island");
+ o := algebra.find(tzn,"Wake Island");
+ vh_a:timezone := algebra.fetch(tzdef,o);
wh_a:bat[:oid,:daytime] :=
mal.multiplex("mtime","daytime",timestamp_bat,vh_a);
# [daytime](timestamp_bat,algebra.find(timezones,"Wake Island")),
- xh_a:timezone := algebra.find(timezones,"American Samoa");
+ o := algebra.find(tzn,"American Samoa");
+ xh_a:timezone := algebra.fetch(tzdef,o);
yh_a:bat[:oid,:date] :=
mal.multiplex("mtime","date",timestamp_bat,xh_a);
ai_a := bat.setColumn(yh_a,"American Samoa");
# [date](timestamp_bat,algebra.find(timezones,"American
Samoa")).bat.setColumn("American Samoa"),
- bi_a:timezone := algebra.find(timezones,"American Samoa");
+ o := algebra.find(tzn,"American Samoa");
+ bi_a:timezone := algebra.fetch(tzdef,o);
ci_a:bat[:oid,:daytime] :=
mal.multiplex("mtime","daytime",timestamp_bat,bi_a);
io.print("print(timestamp_bat,th_a,wh_a,yh_a,ci_a)");
di_a := io.print(timestamp_bat,th_a,wh_a,yh_a,ci_a);
@@ -579,10 +584,12 @@ io.print("daytime_bat,bh_a,dh_a,fh_a,hh_
ti_a := io.print(timestamp_bat,timestamp_plus,timestamp_minus,ri_a);
# [/]([diff](timestamp_plus,
timestamp_minus),calc.lng(60*60*1000)).bat.setColumn("diff"));
#
- ui_a:timezone := algebra.find(timezones,"West/Europe");
+ o := algebra.find(tzn,"West/Europe");
+ ui_a:timezone := algebra.fetch(tzdef,o);
timestamp_eur:bat[:oid,:timestamp]:=
mal.multiplex("mtime","timestamp",date_seq,daytime_00,ui_a);
#var timestamp_eur := [timestamp](date_seq, daytime_00,
algebra.find(timezones,"West/Europe"));
- vi_a:timezone := algebra.find(timezones,"Andes/Brazil");
+ o := algebra.find(tzn,"Andes/Brazil");
+ vi_a:timezone := algebra.fetch(tzdef,o);
timestamp_bra:bat[:oid,:timestamp]:=
mal.multiplex("mtime","timestamp",date_seq,daytime_00,vi_a);
#var timestamp_bra := [timestamp](date_seq, daytime_00,
algebra.find(timezones,"Andes/Brazil"));
#
@@ -594,13 +601,15 @@ io.print("daytime_bat,bh_a,dh_a,fh_a,hh_
# [dayname]([dayofweek](date_seq)).bat.setColumn("day"),
bj_a := bat.setColumn(timestamp_eur,"West/Europe");
# timestamp_eur.bat.setColumn("West/Europe"),
- cj_a:timezone := algebra.find(timezones,"West/Europe");
+ o := algebra.find(tzn,"West/Europe");
+ cj_a:timezone := algebra.find(tzdef,o);
dj_a:bat[:oid,:bit] := mal.multiplex("mtime","dst",timestamp_eur,cj_a);
ej_a := bat.setColumn(dj_a,"dst");
#
[dst](timestamp_eur,algebra.find(timezones,"West/Europe")).bat.setColumn("dst"),
fj_a := bat.setColumn(timestamp_bra,"Andes/Brazil");
# timestamp_bra.bat.setColumn("Andes/Brazil"),
- gj_a:timezone := algebra.find(timezones,"Andes/Brazil");
+ o := algebra.find(tzn,"Andes/Brazil");
+ gj_a:timezone := algebra.fetch(tzdef,o);
hj_a:bat[:oid,:bit] := mal.multiplex("mtime","dst",timestamp_bra,gj_a);
ij_a := bat.setColumn(hj_a,"dst");
io.print("print(date_seq,yi_a,timestamp_eur,dj_a,timestamp_bra,hj_a)");
diff --git a/monetdb5/mal/Tests/tst1200.stable.out
b/monetdb5/mal/Tests/tst1200.stable.out
--- a/monetdb5/mal/Tests/tst1200.stable.out
+++ b/monetdb5/mal/Tests/tst1200.stable.out
@@ -651,240 +651,240 @@ function user.main():void;
## test the operations on rules
ma_a := bat.setColumn(rule_bat,"rule");
#io.print(rule_bat.bat.setColumn("rule"),
- X_840 := bat.new(nil:oid,nil:int);
-barrier (X_844,X_845) := iterator.new(rule_bat);
- X_847 := mtime.month(X_845);
- bat.insert(X_840,X_844,X_847);
- redo (X_844,X_845) := iterator.next(rule_bat);
-exit (X_844,X_845);
- na_a:bat[:oid,:int] := X_840;
+ X_847 := bat.new(nil:oid,nil:int);
+barrier (X_851,X_852) := iterator.new(rule_bat);
+ X_854 := mtime.month(X_852);
+ bat.insert(X_847,X_851,X_854);
+ redo (X_851,X_852) := iterator.next(rule_bat);
+exit (X_851,X_852);
+ na_a:bat[:oid,:int] := X_847;
oa_a := bat.setColumn(na_a,"month");
# [month](rule_bat).bat.setColumn("month"),
- X_852 := bat.new(nil:oid,nil:int);
-barrier (X_854,X_855) := iterator.new(rule_bat);
- X_857 := mtime.weekday(X_855);
- bat.insert(X_852,X_854,X_857);
- redo (X_854,X_855) := iterator.next(rule_bat);
-exit (X_854,X_855);
- pa_a:bat[:oid,:int] := X_852;
+ X_859 := bat.new(nil:oid,nil:int);
+barrier (X_861,X_862) := iterator.new(rule_bat);
+ X_864 := mtime.weekday(X_862);
+ bat.insert(X_859,X_861,X_864);
+ redo (X_861,X_862) := iterator.next(rule_bat);
+exit (X_861,X_862);
+ pa_a:bat[:oid,:int] := X_859;
qa_a := bat.setColumn(pa_a,"weekday");
# [weekday](rule_bat).bat.setColumn("weekday"),
- X_862 := bat.new(nil:oid,nil:int);
-barrier (X_864,X_865) := iterator.new(rule_bat);
- X_867 := mtime.day(X_865);
- bat.insert(X_862,X_864,X_867);
- redo (X_864,X_865) := iterator.next(rule_bat);
-exit (X_864,X_865);
- ra_a:bat[:oid,:int] := X_862;
+ X_869 := bat.new(nil:oid,nil:int);
+barrier (X_871,X_872) := iterator.new(rule_bat);
+ X_874 := mtime.day(X_872);
+ bat.insert(X_869,X_871,X_874);
+ redo (X_871,X_872) := iterator.next(rule_bat);
+exit (X_871,X_872);
+ ra_a:bat[:oid,:int] := X_869;
sa_a := bat.setColumn(ra_a,"day");
# [day](rule_bat).bat.setColumn("day"),
- X_872 := bat.new(nil:oid,nil:int);
-barrier (X_874,X_875) := iterator.new(rule_bat);
- X_877 := mtime.minutes(X_875);
- bat.insert(X_872,X_874,X_877);
- redo (X_874,X_875) := iterator.next(rule_bat);
-exit (X_874,X_875);
- ta_a:bat[:oid,:int] := X_872;
+ X_879 := bat.new(nil:oid,nil:int);
+barrier (X_881,X_882) := iterator.new(rule_bat);
+ X_884 := mtime.minutes(X_882);
+ bat.insert(X_879,X_881,X_884);
+ redo (X_881,X_882) := iterator.next(rule_bat);
+exit (X_881,X_882);
+ ta_a:bat[:oid,:int] := X_879;
ua_a := bat.setColumn(ta_a,"minutes");
io.print("rule_bat,na_a,pa_a,ra_a,ta_a");
va_a := io.print(month_bat,rule_bat,na_a,pa_a,ra_a,ta_a);
# [minutes](rule_bat).bat.setColumn("minutes"));
bat.setColumn(rule_bat,"rule");
#io.print(rule_bat.bat.setColumn("rule"),
- X_882 := bat.new(nil:oid,nil:date);
-barrier (X_886,X_887) := iterator.new(rule_bat);
- X_889 := mtime.compute(X_887,2001);
- bat.insert(X_882,X_886,X_889);
- redo (X_886,X_887) := iterator.next(rule_bat);
-exit (X_886,X_887);
- xa_a:bat[:oid,:date] := X_882;
+ X_889 := bat.new(nil:oid,nil:date);
+barrier (X_893,X_894) := iterator.new(rule_bat);
+ X_896 := mtime.compute(X_894,2001);
+ bat.insert(X_889,X_893,X_896);
+ redo (X_893,X_894) := iterator.next(rule_bat);
+exit (X_893,X_894);
+ xa_a:bat[:oid,:date] := X_889;
ya_a := bat.setColumn(xa_a,"2001");
# [compute](rule_bat, 2001).bat.setColumn("2001"),
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list