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

Modified Files:
      Tag: MonetDB_5-4
        batcalc.mx 
Log Message:
fixed also on m5 order propagation with multiplication


Index: batcalc.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/modules/kernel/batcalc.mx,v
retrieving revision 1.148.2.1
retrieving revision 1.148.2.2
diff -u -d -r1.148.2.1 -r1.148.2.2
--- batcalc.mx  6 Feb 2008 14:36:27 -0000       1.148.2.1
+++ batcalc.mx  8 Feb 2008 15:24:23 -0000       1.148.2.2
@@ -517,7 +517,18 @@
        } else {
                @:accumCst(@3,@1,@4,@5)@ 
        }
-       bn->tsorted = 0;
+       if (@6 == 2)
+               bn->tsorted = BATtordered(b);
+#if @7
+       else if (@6 == 3) {
+               if (*(@5*)cst >= 0) 
+                       bn->tsorted = BATtordered(b);
+               else
+                       bn->tsorted = REVERT_SORTED(BATtordered(b));
+       } 
+#endif
+       else
+               bn->tsorted = 0;
        BATkey(BATmirror(bn),FALSE);
 
        BBPkeepref(*ret = bn->batCacheid);
@@ -540,7 +551,18 @@
        } else {
                @:accumCstLeft(@3,@1,@4,@5)@ 
        }
-       bn->tsorted = 0;
+       if (@6 == 2)
+               bn->tsorted = BATtordered(b);
+#if @7
+       else if (@6 == 3) {
+               if (*(@4*)cst >= 0) 
+                       bn->tsorted = BATtordered(b);
+               else
+                       bn->tsorted = REVERT_SORTED(BATtordered(b));
+       } 
+#endif
+       else
+               bn->tsorted = 0;
        BATkey(BATmirror(bn),FALSE);
 
        BBPkeepref(*ret = bn->batCacheid);
@@ -567,7 +589,18 @@
                @:accumCst(@3,@1,@4,@5)@ 
        }
        BATsetcount(bn, BATcount(b));
-       bn->tsorted = 0;
+       if (@6 == 2)
+               bn->tsorted = BATtordered(b);
+#if @7
+       else if (@6 == 3) {
+               if (*(@5*)cst >= 0) 
+                       bn->tsorted = BATtordered(b);
+               else
+                       bn->tsorted = REVERT_SORTED(BATtordered(b));
+       } 
+#endif
+       else
+               bn->tsorted = 0;
        BATkey(BATmirror(bn),FALSE);
 
        if (!(bn->batDirty&2)) bn = BATsetaccess(bn, BAT_READ); 
@@ -597,7 +630,18 @@
                @:accumCstLeft(@3,@1,@4,@5)@ 
        }
        BATsetcount(bn, BATcount(b));
-       bn->tsorted = 0;
+       if (@6 == 2)
+               bn->tsorted = BATtordered(b);
+#if @7
+       else if (@6 == 3) {
+               if (*(@5*)cst >= 0) 
+                       bn->tsorted = BATtordered(b);
+               else
+                       bn->tsorted = REVERT_SORTED(BATtordered(b));
+       } 
+#endif
+       else
+               bn->tsorted = 0;
        BATkey(BATmirror(bn),FALSE);
 
        if (!(bn->batDirty&2)) bn = BATsetaccess(bn, BAT_READ); 
@@ -617,32 +661,32 @@
 #include "batcalc.h"
 
 @= arithGrpImpl
-@:arithmeticImpl(@1,@2,flt,flt,flt)@
-@:arithmeticImpl(@1,@2,dbl,dbl,dbl)@
-@:arithmeticImpl(@1,@2,oid,oid,oid)@
+@:arithmeticImpl(@1,@2,flt,flt,flt,@3,1)@
+@:arithmeticImpl(@1,@2,dbl,dbl,dbl,@3,1)@
+@:arithmeticImpl(@1,@2,oid,oid,oid,@3,0)@
 
-@:arithmeticImpl(@1,@2,int,int,sht)@
-@:arithmeticImpl(@1,@2,int,sht,int)@
-@:arithmeticImpl(@1,@2,int,sht,sht)@
-@:arithmeticImpl(@1,@2,sht,sht,sht)@
+@:arithmeticImpl(@1,@2,int,int,sht,@3,1)@
+@:arithmeticImpl(@1,@2,int,sht,int,@3,1)@
+@:arithmeticImpl(@1,@2,int,sht,sht,@3,1)@
+@:arithmeticImpl(@1,@2,sht,sht,sht,@3,1)@
 
-@:arithmeticImpl(@1,@2,lng,lng,lng)@
-@:arithmeticImpl(@1,@2,lng,sht,lng)@
-@:arithmeticImpl(@1,@2,lng,lng,sht)@
-@:arithmeticImpl(@1,@2,lng,sht,sht)@
-@:arithmeticImpl(@1,@2,lng,sht,int)@
-@:arithmeticImpl(@1,@2,lng,int,sht)@
-@:arithmeticImpl(@1,@2,lng,int,lng)@
-@:arithmeticImpl(@1,@2,lng,lng,int)@
+@:arithmeticImpl(@1,@2,lng,lng,lng,@3,1)@
+@:arithmeticImpl(@1,@2,lng,sht,lng,@3,1)@
+@:arithmeticImpl(@1,@2,lng,lng,sht,@3,1)@
+@:arithmeticImpl(@1,@2,lng,sht,sht,@3,1)@
+@:arithmeticImpl(@1,@2,lng,sht,int,@3,1)@
+@:arithmeticImpl(@1,@2,lng,int,sht,@3,1)@
+@:arithmeticImpl(@1,@2,lng,int,lng,@3,1)@
+@:arithmeticImpl(@1,@2,lng,lng,int,@3,1)@
 
-@:arithmeticImpl(@1,@2,lng,int,int)@
-@:arithmeticImpl(@1,@2,int,int,int)@
+@:arithmeticImpl(@1,@2,lng,int,int,@3,1)@
+@:arithmeticImpl(@1,@2,int,int,int,@3,1)@
 
 @c
-@:arithGrpImpl(/,DIV)@
-@:arithGrpImpl(*,MUL)@
-@:arithGrpImpl(-,SUB)@
-@:arithGrpImpl(+,ADD)@
+@:arithGrpImpl(/,DIV,0)@
+@:arithGrpImpl(*,MUL,3)@
+@:arithGrpImpl(-,SUB,2)@
+@:arithGrpImpl(+,ADD,2)@
 
 @-  Modulo arithmetic
 The Modulo function doesn;t work on all types. Therefore we 


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
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