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

Modified Files:
        mat.mx 
Log Message:
For the duration of the experiments we pack a MAT into its first
argument, i.e. the BAT from the sql.bind().
The number of remaining tests calling for more analysis is reduced to 6.


Index: mat.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/modules/mal/mat.mx,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- mat.mx      8 Aug 2007 13:01:33 -0000       1.14
+++ mat.mx      19 Aug 2007 19:15:20 -0000      1.15
@@ -38,7 +38,7 @@
 
 pattern pack(b:bat[:any_1,:any_2]...):bat[:any_1,:any_2]
 address MATpack
-comment "Materialize the MAT into a single BAT";
+comment "Materialize the MAT into the first BAT";
 
 pattern print(b:bat[:any_1,:any_2]...):void
 address MATprint;
@@ -129,6 +129,8 @@
 @-
 The pack operation could be quite expensive, because it
 may create a really large BAT.
+For the experiments we materialize the BAT in the first
+component. 
 @c
 str
 MATpack(MalBlkPtr mb, MalStkPtr stk, InstrPtr p)
@@ -137,14 +139,15 @@
        BAT *b, *bn;
        tpe= getArgType(mb,p,0);
 
-       bn= BATnew(getHeadType(tpe),getTailType(tpe), 0);
+       bn= BATdescriptor(stk->stk[getArg(p,1)].val.ival);
        if( bn == NULL)
-               throw(MAL, "mat.pack","Could not allocate storage");
-       for(i=1; i<p->argc; i++){
+               throw(MAL, "mat.pack","Could access BAT");
+       for(i=2; i<p->argc; i++){
                b= BATdescriptor(stk->stk[getArg(p,i)].val.ival);
                if( b == NULL)
                        throw(MAL, "mat.pack","Could not access component");
-               BATins(bn,b,FALSE);
+               if( BATcount(b) )
+                       BATins(bn,b,FALSE);
                BBPunfix(b->batCacheid);
        }
        (void) mb;


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins

Reply via email to