Update of /cvsroot/monetdb/MonetDB4/src/modules/plain
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv26065/src/modules/plain
Modified Files:
Tag: MonetDB_4-22
algebra.mx
Log Message:
sum now returns NULL for empty bats
Index: algebra.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB4/src/modules/plain/algebra.mx,v
retrieving revision 1.10.2.1
retrieving revision 1.10.2.2
diff -u -d -r1.10.2.1 -r1.10.2.2
--- algebra.mx 5 Feb 2008 22:33:30 -0000 1.10.2.1
+++ algebra.mx 14 Mar 2008 19:20:04 -0000 1.10.2.2
@@ -1352,6 +1352,8 @@
@2 [EMAIL PROTECTED];
BATcheck(b,"[EMAIL PROTECTED]@2");
+ if (!BATcount(b))
+ result = @2_nil;
BATloop(b, p, q) {
@1 *value = (@1*) BUNtloc(bi, p);
if (*value == @1_nil) {
@@ -1379,6 +1381,8 @@
@2 [EMAIL PROTECTED];
BATcheck(b,"BATprodInt");
+ if (!BATcount(b))
+ result = @2_nil;
BATloop(b, p, q) {
@1 *value = (@1*) BUNtloc(bi, p);
if (*value == @1_nil) {
-------------------------------------------------------------------------
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