Changeset: 1ed54ae01381 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1ed54ae01381
Modified Files:
        monetdb5/mal/Tests/tst029.mal
        monetdb5/mal/Tests/tst029.stable.out
        monetdb5/mal/Tests/tst237.mal
        monetdb5/mal/Tests/tst280.mal
        monetdb5/mal/Tests/tst280.stable.out
        monetdb5/modules/kernel/aggr.mal
        monetdb5/modules/kernel/aggr.mal.sh
        monetdb5/modules/mal/Tests/ascii_io2.mal
        monetdb5/modules/mal/Tests/ascii_io2.stable.out
        monetdb5/modules/mal/Tests/inspect05.stable.out
        monetdb5/modules/mal/Tests/manifold.mal
        monetdb5/modules/mal/Tests/manifold.stable.out
        monetdb5/modules/mal/Tests/manifoldstr.mal
        monetdb5/modules/mal/Tests/manifoldstr.stable.out
        monetdb5/tests/suite_00/Tests/test_40.mal
        monetdb5/tests/suite_00/Tests/test_40.stable.out
Branch: Oct2014
Log Message:

Prepare for fetch(:bat,:oid) only signature
We should drop the fetch(:bat,:int) and fetch(:bat,:lng) versions
All fetches should go thru the :oid


diffs (292 lines):

diff --git a/monetdb5/mal/Tests/tst029.mal b/monetdb5/mal/Tests/tst029.mal
--- a/monetdb5/mal/Tests/tst029.mal
+++ b/monetdb5/mal/Tests/tst029.mal
@@ -3,5 +3,5 @@ bat.append(b, "io.print(1);");
 bat.append(b, "io.print(\"hello\");");
 bat.append(b,"s:=\"goodbye\";io.print(s);");
 io.print(b);
-s:= algebra.fetch(b,2);
+s:= algebra.fetch(b,2@0);
 io.printf("%s\n",s);
diff --git a/monetdb5/mal/Tests/tst029.stable.out 
b/monetdb5/mal/Tests/tst029.stable.out
--- a/monetdb5/mal/Tests/tst029.stable.out
+++ b/monetdb5/mal/Tests/tst029.stable.out
@@ -17,7 +17,7 @@ stdout of test 'tst029` in directory 'mo
 #bat.insert(b,2, "io.print(\"hello\");");
 #bat.insert(b,3,"s:=\"goodbye\";io.print(s);");
 #io.print(b);
-#s:= algebra.fetch(b,2);
+#s:= algebra.fetch(b,2@0);
 #io.printf("%s\n",s);
 #
 function user.main():void;
@@ -26,7 +26,7 @@ function user.main():void;
     bat.append(b,"io.print(\"hello\");");
     bat.append(b,"s:=\"goodbye\";io.print(s);");
     io.print(b);
-    s := algebra.fetch(b,2);
+    s := algebra.fetch(b,2@0);
     io.printf("%s\n",s);
 end main;
 #-----------------------------------------#
diff --git a/monetdb5/mal/Tests/tst237.mal b/monetdb5/mal/Tests/tst237.mal
--- a/monetdb5/mal/Tests/tst237.mal
+++ b/monetdb5/mal/Tests/tst237.mal
@@ -18,7 +18,7 @@ io.print(bbl);
 
 c:= bat.new(:oid,:oid);
 bat.append(c,1@0);
-o:= algebra.fetch(c,0);
+o:= algebra.fetch(c,0@0);
 io.print(o);
 bat.append(c,2@0);
 bat.append(c,3@0);
diff --git a/monetdb5/mal/Tests/tst280.mal b/monetdb5/mal/Tests/tst280.mal
--- a/monetdb5/mal/Tests/tst280.mal
+++ b/monetdb5/mal/Tests/tst280.mal
@@ -8,8 +8,8 @@ function tst(A2:bat[:oid,:int],A3:bat[:o
        resB := bat.new(:oid,:int); 
        lim:= aggr.count(A2);
        io.printf("count %d\n",lim);
-       l:= calc.lng(lim);
-barrier m:= 0:lng;
+       l:= calc.oid(lim);
+barrier m:= 0:oid;
        io.printf("loopindex %d\n",m);
         B2 := algebra.fetch(A2,m);       
        io.printf("B2 value %d\n",B2);
@@ -17,7 +17,7 @@ barrier m:= 0:lng;
        io.printf("B3 value %d\n",B3);
         cr := user.pow(B2,B3);
         bat.append(resB,cr); 
-        redo m := iterator.next(1:lng,l);    
+        redo m := iterator.next(1:oid,l);    
 catch   MALException:str;  
 exit    MALException; 
 exit    m ;  
@@ -27,7 +27,7 @@ end tst;
        b := bat.new(:oid,:int);
        bat.append(b,1);
        bat.append(b,2);
-       e:= algebra.fetch(b,1:lng);
+       e:= algebra.fetch(b,1:oid);
        io.print(e);
        io.print(b);
        c:= algebra.copy(b);
diff --git a/monetdb5/mal/Tests/tst280.stable.out 
b/monetdb5/mal/Tests/tst280.stable.out
--- a/monetdb5/mal/Tests/tst280.stable.out
+++ b/monetdb5/mal/Tests/tst280.stable.out
@@ -48,8 +48,8 @@ function user.tst(A2:bat[:oid,:int],A3:b
     resB := bat.new(:oid,:int);
     lim := aggr.count(A2);
     io.printf("count %d\n",lim);
-    l := calc.lng(lim);
-barrier m := 0:lng;
+    l := calc.oid(lim);
+barrier m := 0@0:oid;
     io.printf("loopindex %d\n",m);
     B2 := algebra.fetch(A2,m);
     io.printf("B2 value %d\n",B2);
@@ -57,7 +57,7 @@ barrier m := 0:lng;
     io.printf("B3 value %d\n",B3);
     cr := user.pow(B2,B3);
     bat.append(resB,cr);
-    redo m := iterator.next(1:lng,l);
+    redo m := iterator.next(1@0:oid,l);
 catch MALException:str ;
 exit MALException:str ;
 exit m;
@@ -69,7 +69,7 @@ function user.main():void;
     b := bat.new(:oid,:int);
     bat.append(b,1);
     bat.append(b,2);
-    e := algebra.fetch(b,1:lng);
+    e := algebra.fetch(b,1@0:oid);
     io.print(e);
     io.print(b);
     c := algebra.copy(b);
diff --git a/monetdb5/modules/kernel/aggr.mal b/monetdb5/modules/kernel/aggr.mal
--- a/monetdb5/modules/kernel/aggr.mal
+++ b/monetdb5/modules/kernel/aggr.mal
@@ -1440,7 +1440,7 @@ comment "Grouped median aggregate";
 
 function median(b:bat[:oid,:any_1]) :any_1;
        bn := submedian(b, true);
-       return algebra.fetch(bn, 0);
+       return algebra.fetch(bn, 0@0);
 end aggr.median;
 
 command submedian(b:bat[:oid,:any_1],skip_nils:bit) :bat[:oid,:any_1]
@@ -1462,7 +1462,7 @@ comment "Grouped quantile aggregate";
 
 function quantile(b:bat[:oid,:any_1],q:bat[:oid,:dbl]) :any_1;
        bn := subquantile(b, q, false);
-       return algebra.fetch(bn, 0);
+       return algebra.fetch(bn, 0@0);
 end aggr.quantile;
 
 command subquantile(b:bat[:oid,:any_1],q:bat[:oid,:dbl],skip_nils:bit) 
:bat[:oid,:any_1]
diff --git a/monetdb5/modules/kernel/aggr.mal.sh 
b/monetdb5/modules/kernel/aggr.mal.sh
--- a/monetdb5/modules/kernel/aggr.mal.sh
+++ b/monetdb5/modules/kernel/aggr.mal.sh
@@ -304,7 +304,7 @@ comment "Grouped median aggregate";
 
 function median(b:bat[:oid,:any_1]) :any_1;
        bn := submedian(b, false);
-       return algebra.fetch(bn, 0);
+       return algebra.fetch(bn, 0@0);
 end aggr.median;
 
 command submedian(b:bat[:oid,:any_1],skip_nils:bit) :bat[:oid,:any_1]
@@ -326,7 +326,7 @@ comment "Grouped quantile aggregate";
 
 function quantile(b:bat[:oid,:any_1],q:bat[:oid,:dbl]) :any_1;
        bn := subquantile(b, q, false);
-       return algebra.fetch(bn, 0);
+       return algebra.fetch(bn, 0@0);
 end aggr.quantile;
 
 command subquantile(b:bat[:oid,:any_1],q:bat[:oid,:dbl],skip_nils:bit) 
:bat[:oid,:any_1]
diff --git a/monetdb5/modules/mal/Tests/ascii_io2.mal 
b/monetdb5/modules/mal/Tests/ascii_io2.mal
--- a/monetdb5/modules/mal/Tests/ascii_io2.mal
+++ b/monetdb5/modules/mal/Tests/ascii_io2.mal
@@ -25,10 +25,10 @@ io.printf("#source:%s\n",datafile);
 idxbat := tablet.load(namebat, sepbat, typebat, datafile, len);
 #io.print(idxbat);
 
-b1:bat[:oid,:str] := algebra.fetch(idxbat,0);
+b1:bat[:oid,:str] := algebra.fetch(idxbat,0@0);
 #b1:bat[:oid,:str] := bbp.bind(i1);
 io.print(b1);
 
-b2:bat[:oid,:str] := algebra.fetch(idxbat,1); 
+b2:bat[:oid,:str] := algebra.fetch(idxbat,1@0); 
 #b2:bat[:oid,:str] := bbp.bind(i2);
 io.print(b2);
diff --git a/monetdb5/modules/mal/Tests/ascii_io2.stable.out 
b/monetdb5/modules/mal/Tests/ascii_io2.stable.out
--- a/monetdb5/modules/mal/Tests/ascii_io2.stable.out
+++ b/monetdb5/modules/mal/Tests/ascii_io2.stable.out
@@ -35,10 +35,10 @@ exit correct;
     io.printf("#source:%s\n",datafile);
     idxbat := tablet.load(namebat,sepbat,typebat,datafile,len);
 #io.print(idxbat);
-    b1:bat[:oid,:str]  := algebra.fetch(idxbat,0);
+    b1:bat[:oid,:str]  := algebra.fetch(idxbat,0@0);
 #b1:bat[:oid,:str] := bbp.bind(i1); 
     io.print(b1);
-    b2:bat[:oid,:str]  := algebra.fetch(idxbat,1);
+    b2:bat[:oid,:str]  := algebra.fetch(idxbat,1@0);
 #b2:bat[:oid,:str] := bbp.bind(i2); 
     io.print(b2);
 end main;
diff --git a/monetdb5/modules/mal/Tests/inspect05.stable.out 
b/monetdb5/modules/mal/Tests/inspect05.stable.out
--- a/monetdb5/modules/mal/Tests/inspect05.stable.out
+++ b/monetdb5/modules/mal/Tests/inspect05.stable.out
@@ -126,7 +126,7 @@ end main;
 [ "setColumn", "command",      "bat",  "(b:bat[:oid,:any_2],t:str):void ",     
"BKCsetColumn;"  ]
 [ "setHash",   "command",      "bat",  "(b:bat[:oid,:any_2]):bit ",    
"BKCsetHash;"  ]
 [ "setHot",    "command",      "bat",  "(b:bat[:oid,:any_2]):void ",   
"BKChotBAT;"  ]
-[ "setImpints",        "command",      "bat",  "(b:bat[:oid,:any_2]):bit ",    
"BKCsetImpints;"  ]
+[ "setImprints",       "command",      "bat",  "(b:bat[:oid,:any_2]):bit ",    
"BKCsetImprints;"  ]
 [ "setKey",                      "command",      "bat",          
"(b:bat[:any_1,:any_2],mode:bit):bat[:any_1,:any_2] ",                          
"BKCsetkey;"                            ]
 [ "setMemoryMap",      "command",      "bat",  
"(b:bat[:oid,:any_2],mode:int):bit ",   "BKCmmap2;"  ]
 [ "setMemoryMap",      "command",      "bat",  
"(b:bat[:oid,:any_2],head_mode:int,tail_mode:int,hheap_mode:int,theap_mode:int):bit
 ",  "BKCmmap;"  ]
diff --git a/monetdb5/modules/mal/Tests/manifold.mal 
b/monetdb5/modules/mal/Tests/manifold.mal
--- a/monetdb5/modules/mal/Tests/manifold.mal
+++ b/monetdb5/modules/mal/Tests/manifold.mal
@@ -33,11 +33,11 @@ io.printf("#sum %f\n",s);
 #x:bat[:oid,:dbl]:= mal.multiplex("mmath","sin",b);
 t0:= alarm.usec();
 x:= bat.new(:oid,:dbl);
-barrier i:= 0:lng;
+barrier i:= 0@0;
        ii:= algebra.fetch(b,i);
        d:= mmath.sin(ii);
        bat.append(x,d);
-       redo i:= iterator.next(1:lng,1000000:lng);
+       redo i:= iterator.next(1@0,1000000@0);
 exit i;
 t1:= alarm.usec();
 d0:= t1-t0;
diff --git a/monetdb5/modules/mal/Tests/manifold.stable.out 
b/monetdb5/modules/mal/Tests/manifold.stable.out
--- a/monetdb5/modules/mal/Tests/manifold.stable.out
+++ b/monetdb5/modules/mal/Tests/manifold.stable.out
@@ -47,11 +47,11 @@ exit i;
     io.printf("#sum %f\n",s);
     t0 := alarm.usec();
     x := bat.new(:oid,:dbl);
-barrier i := 0:lng;
+barrier i := 0@0;
     ii := algebra.fetch(b,i);
     d := mmath.sin(ii);
     bat.append(x,d);
-    redo i := iterator.next(1:lng,1000000:lng);
+    redo i := iterator.next(1@0,1000000@0);
 exit i;
     t1 := alarm.usec();
     d0 := calc.-(t1,t0);
diff --git a/monetdb5/modules/mal/Tests/manifoldstr.mal 
b/monetdb5/modules/mal/Tests/manifoldstr.mal
--- a/monetdb5/modules/mal/Tests/manifoldstr.mal
+++ b/monetdb5/modules/mal/Tests/manifoldstr.mal
@@ -31,11 +31,11 @@ io.printf("#mal.manifold(str,toUpper) %d
 # x:bat[:oid,:str]:= mal.multiplex("str","toUpper",b);
 t0:= alarm.usec();
 x:= bat.new(:oid,:str);
-barrier i:= 0:lng;
+barrier i:= 0@0;
        ii:= algebra.fetch(b,i);
        d:= str.toUpper(ii);
        bat.append(x,d);
-       redo i:= iterator.next(1:lng,100000:lng);
+       redo i:= iterator.next(1@0,100000@0);
 exit i;
 t1:= alarm.usec();
 d0:= t1-t0;
diff --git a/monetdb5/modules/mal/Tests/manifoldstr.stable.out 
b/monetdb5/modules/mal/Tests/manifoldstr.stable.out
--- a/monetdb5/modules/mal/Tests/manifoldstr.stable.out
+++ b/monetdb5/modules/mal/Tests/manifoldstr.stable.out
@@ -46,11 +46,11 @@ exit i;
 # x:bat[:oid,:str]:= mal.multiplex("str","toUpper",b); 
     t0 := alarm.usec();
     x := bat.new(:oid,:str);
-barrier i := 0:lng;
+barrier i := 0@0;
     ii := algebra.fetch(b,i);
     d := str.toUpper(ii);
     bat.append(x,d);
-    redo i := iterator.next(1:lng,100000:lng);
+    redo i := iterator.next(1@0,100000@0);
 exit i;
     t1 := alarm.usec();
     d0 := calc.-(t1,t0);
diff --git a/monetdb5/tests/suite_00/Tests/test_40.mal 
b/monetdb5/tests/suite_00/Tests/test_40.mal
--- a/monetdb5/tests/suite_00/Tests/test_40.mal
+++ b/monetdb5/tests/suite_00/Tests/test_40.mal
@@ -21,9 +21,9 @@
        sa_a := bat.append(b,81);
        ta_a := bat.save(b);
        ua_a := bat.load("b");
-       xa_a := algebra.fetch(b,5);
+       xa_a := algebra.fetch(b,5@0);
        ya_a := io.print(xa_a);
-       ab_a := algebra.fetch(b,8);
+       ab_a := algebra.fetch(b,8@0);
        bb_a := io.print(ab_a);
        cb_a := algebra.slice(b,5,8);
        db_a := io.print(cb_a);
diff --git a/monetdb5/tests/suite_00/Tests/test_40.stable.out 
b/monetdb5/tests/suite_00/Tests/test_40.stable.out
--- a/monetdb5/tests/suite_00/Tests/test_40.stable.out
+++ b/monetdb5/tests/suite_00/Tests/test_40.stable.out
@@ -46,10 +46,10 @@ function user.main():void;
     ta_a := bat.save(b);
 #      io.print("load(\"b\");"); 
     ua_a := bat.load("b");
-    xa_a := algebra.fetch(b,5);
+    xa_a := algebra.fetch(b,5@0);
     ya_a := io.print(xa_a);
 #      io.print("b.fetch(8).print();"); 
-    ab_a := algebra.fetch(b,8);
+    ab_a := algebra.fetch(b,8@0);
     bb_a := io.print(ab_a);
 #      io.print("b.slice(5,8).print();"); 
     cb_a := algebra.slice(b,5,8);
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to