Update of /cvsroot/monetdb/MonetDB5/src/modules/kernel
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv11951/src/modules/kernel

Modified Files:
      Tag: GDK-2
        batcalc.mx batifthen.mx 
Log Message:
propagated changes of Tuesday Sep 18 2007 - Monday Sep 24 2007
from the development trunk to the GDK-2 branch

There were conflicts in src/modules/kernel/batifthen.mx which I have
tried to resolve, but please check.


Index: batcalc.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/modules/kernel/batcalc.mx,v
retrieving revision 1.142.2.4
retrieving revision 1.142.2.5
diff -u -d -r1.142.2.4 -r1.142.2.5
--- batcalc.mx  12 Aug 2007 11:44:19 -0000      1.142.2.4
+++ batcalc.mx  24 Sep 2007 09:41:37 -0000      1.142.2.5
@@ -457,7 +457,7 @@
 
        BATsetcount(bn, BATcount(b));
        bn->tsorted = 0;
-       BATkey(BATmirror(bn),0);           
+       BATkey(BATmirror(bn),FALSE);
 
        if (!(bn->batDirty&2)) bn = BATsetaccess(bn, BAT_READ); 
 
@@ -489,7 +489,7 @@
        @:loopImpl(@1,@2,@3,@4,@5)@
 
        bn->tsorted = 0;
-       BATkey(BATmirror(bn),0);           
+       BATkey(BATmirror(bn),FALSE);
 
        BBPkeepref(*ret = bn->batCacheid);
        BBPreleaseref(b->batCacheid);
@@ -517,7 +517,7 @@
                @:accumCst(@3,@1,@4,@5)@ 
        }
        bn->tsorted = 0;
-       BATkey(BATmirror(bn),0);           
+       BATkey(BATmirror(bn),FALSE);
 
        BBPkeepref(*ret = bn->batCacheid);
        BBPreleaseref(b->batCacheid);
@@ -540,7 +540,7 @@
                @:accumCstLeft(@3,@1,@4,@5)@ 
        }
        bn->tsorted = 0;
-       BATkey(BATmirror(bn),0);           
+       BATkey(BATmirror(bn),FALSE);
 
        BBPkeepref(*ret = bn->batCacheid);
        BBPreleaseref(b->batCacheid);
@@ -567,7 +567,7 @@
        }
        BATsetcount(bn, BATcount(b));
        bn->tsorted = 0;
-       BATkey(BATmirror(bn),0);           
+       BATkey(BATmirror(bn),FALSE);
 
        if (!(bn->batDirty&2)) bn = BATsetaccess(bn, BAT_READ); 
 
@@ -597,7 +597,7 @@
        }
        BATsetcount(bn, BATcount(b));
        bn->tsorted = 0;
-       BATkey(BATmirror(bn),0);           
+       BATkey(BATmirror(bn),FALSE);
 
        if (!(bn->batDirty&2)) bn = BATsetaccess(bn, BAT_READ); 
 
@@ -655,7 +655,7 @@
        @:accum(@3,@2,@4,@5)@
        BATsetcount(bn, BATcount(b));
        bn->tsorted = 0;
-       BATkey(BATmirror(bn),0);           
+       BATkey(BATmirror(bn),FALSE);
 
        return MAL_SUCCEED;
 }
@@ -773,7 +773,7 @@
        }
        BATsetcount(bn, BATcount(b));
        bn->tsorted = 0;
-       BATkey(BATmirror(bn),0);           
+       BATkey(BATmirror(bn),FALSE);
 
        if (!(bn->batDirty&2)) bn = BATsetaccess(bn, BAT_READ); 
 
@@ -798,7 +798,7 @@
        }
        BATsetcount(bn, BATcount(b));
        bn->tsorted = 0;
-       BATkey(BATmirror(bn),0);           
+       BATkey(BATmirror(bn),FALSE);
 
        if (!(bn->batDirty&2)) bn = BATsetaccess(bn, BAT_READ); 
 
@@ -874,7 +874,7 @@
        default: throw(MAL, "[EMAIL PROTECTED]", "unexpected type");
        }
        bn->tsorted = 0;
-       BATkey(BATmirror(bn),0);           
+       BATkey(BATmirror(bn),FALSE);
 
        if (!(bn->batDirty&2)) bn = BATsetaccess(bn, BAT_READ); 
 
@@ -902,7 +902,7 @@
        }
        BATsetcount(bn, BATcount(b));
        bn->tsorted = 0;
-       BATkey(BATmirror(bn),0);           
+       BATkey(BATmirror(bn),FALSE);
 
        if (!(bn->batDirty&2)) bn = BATsetaccess(bn, BAT_READ); 
 
@@ -970,7 +970,7 @@
        }
        BATsetcount(bn, BATcount(b));
        bn->tsorted = 0;
-       BATkey(BATmirror(bn),0);           
+       BATkey(BATmirror(bn),FALSE);
 
        if (!(bn->batDirty&2)) bn = BATsetaccess(bn, BAT_READ); 
 
@@ -1013,7 +1013,7 @@
        }
        BATsetcount(bn, BATcount(b));
        bn->tsorted = 0;
-       BATkey(BATmirror(bn),0);           
+       BATkey(BATmirror(bn),FALSE);
 
        if (!(bn->batDirty&2)) bn = BATsetaccess(bn, BAT_READ); 
 
@@ -1055,7 +1055,7 @@
        }
        BATsetcount(bn, BATcount(b));
        bn->tsorted = 0;
-       BATkey(BATmirror(bn),0);           
+       BATkey(BATmirror(bn),FALSE);
 
        BBPkeepref(*ret= bn->batCacheid);
        BBPreleaseref(b->batCacheid);
@@ -1085,7 +1085,7 @@
        }
        BATsetcount(bn, BATcount(b));
        bn->tsorted = 0;
-       BATkey(BATmirror(bn),0);           
+       BATkey(BATmirror(bn),FALSE);
 
        if (!(bn->batDirty&2)) bn = BATsetaccess(bn, BAT_READ);
 
@@ -1128,7 +1128,7 @@
        }
 
        bn->tsorted = 0;
-       BATkey(BATmirror(bn),0);           
+       BATkey(BATmirror(bn),FALSE);
 
        BBPkeepref(*ret= bn->batCacheid);
        BBPreleaseref(b->batCacheid);
@@ -1200,7 +1200,7 @@
                        *p = ! *o;
        }
        bn->tsorted = 0;
-       BATkey(BATmirror(bn),0);           
+       BATkey(BATmirror(bn),FALSE);
 
        BBPkeepref(*ret= bn->batCacheid);
        BBPreleaseref(b->batCacheid);
@@ -1229,7 +1229,7 @@
        }
        BATsetcount(bn, BATcount(b));
        bn->tsorted = 0;
-       BATkey(BATmirror(bn),0);           
+       BATkey(BATmirror(bn),FALSE);
 
        if (!(bn->batDirty&2)) bn = BATsetaccess(bn, BAT_READ);
 

Index: batifthen.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/modules/kernel/batifthen.mx,v
retrieving revision 1.7.6.2
retrieving revision 1.7.6.3
diff -u -d -r1.7.6.2 -r1.7.6.3
--- batifthen.mx        10 Aug 2007 15:39:43 -0000      1.7.6.2
+++ batifthen.mx        24 Sep 2007 09:41:42 -0000      1.7.6.3
@@ -89,6 +89,22 @@
     BBPkeepref(*ret);
     BBPreleaseref(b->batCacheid);
     return MAL_SUCCEED;
[EMAIL PROTECTED] resBAT
+       if (BAThvoid(b)) {
+               bn = BATnew(TYPE_oid, [EMAIL PROTECTED], BATcount(b));
+               BATseqbase(bn, b->hseqbase);
+       } else {
+               bn = BATnew(b->htype, [EMAIL PROTECTED], BATcount(b));
+       }
+       if( bn== NULL) {
+               @3
+               throw(MAL, @2, "can not create bat");
+       }
+       bn->hsorted = b->hsorted;
+       bn->tsorted = FALSE;
+       BATkey(bn, b->hkey);
+       BATkey(BATmirror(bn), FALSE);
+
 @- IfThenElse
 The conditional multiplex operations .
 @-
@@ -145,14 +161,9 @@
        bit *t;
 
        @:getBATdescriptor(bid,b,"batcalc.ifThen")@
-       @:resultBAT(@1,"batcalc.ifThen")@
-
-       bn= BATnew(ATOMtype(b->htype),[EMAIL PROTECTED],BATcount(b));
-       if( bn == 0 )
-               throw(MAL, "batcalc.ifThen","Can not create BAT");
-
-       bn->hsorted = b->hsorted;
-       bn->tsorted = b->tsorted;
+       @:resBAT(@1,"batcalc.ifThen")@
+       bn->hsorted= b->hsorted;
+       bn->tsorted= b->tsorted;
 
        bi = bat_iterator(b);
        t = (bit*)Tloc(b,BUNfirst(b));
@@ -176,7 +187,7 @@
        bit *t;
 
        @:getBATdescriptor(bid,b,"batcalc.ifThenElse")@
-       @:resultBAT(@1,"batcalc.ifThenElse")@
+       @:resBAT(@1,"batcalc.ifThenElse")@
 
        bi = bat_iterator(b);
        t = (bit*)Tloc(b,BUNfirst(b));
@@ -208,7 +219,7 @@
        @:getBATdescriptor(eid,eb,"batcalc.ifThenElse", 
BBPreleaseref(b->batCacheid); BBPreleaseref(tb->batCacheid);)@
        @:chkSize(b,tb,ifThenElse)@
        @:chkSize(b,eb,ifThenElse)@
-       @:resultBAT(@1,"batcalc.ifThenElse")@
+       @:resBAT(@1,"batcalc.ifThenElse")@
 
        bi = bat_iterator(b);
        tbi = bat_iterator(tb);
@@ -243,13 +254,15 @@
        @:getBATdescriptor(bid,b,"batcalc.ifThenElse")@
        @:getBATdescriptor(eid,eb,"batcalc.ifThenElse", 
BBPreleaseref(b->batCacheid);)@
        @:chkSize(b,eb,ifThenElse)@
-       @:resultBAT(@1,"batcalc.ifThenElse")@
+       @:resBAT(@1,"batcalc.ifThenElse")@
 
        bi = bat_iterator(b);
        ebi = bat_iterator(eb);
 
        t = (bit*) Tloc(b,BUNfirst(b));
 
+       if (ATOMvarsized([EMAIL PROTECTED]))
+               val = *(@1**)val;
        BATloop(b, p, q) {
                if (*t == bit_nil) 
                        BUNfastins(bn, BUNhead(bi,p), (ptr) &nilval);
@@ -276,8 +289,10 @@
        @:getBATdescriptor(bid,b,"batcalc.ifThenElse")@
        
@:getBATdescriptor(tid,tb,"batcalc.ifThenElse",BBPreleaseref(b->batCacheid);)@
        @:chkSize(b,tb,ifThenElse)@
-       @:resultBAT(@1,"batcalc.ifThenElse")@
+       @:resBAT(@1,"batcalc.ifThenElse")@
 
+       if (ATOMvarsized([EMAIL PROTECTED]))
+               val = *(@1**)val;
        bi = bat_iterator(b);
        tbi = bat_iterator(tb);
 


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins

Reply via email to