Update of /cvsroot/monetdb/pathfinder/compiler/algebra/prop
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv4655/compiler/algebra/prop

Modified Files:
      Tag: M5XQ
        prop_reqval.c 
Log Message:
propagated changes of Friday Jun 12 2009 - Monday Jun 15 2009
from the development trunk to the M5XQ branch

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2009/06/12 - tsheyar: compiler/algebra/prop/prop_reqval.c,1.57
-- Replaced aggregate operators count, min, max, avg, sum, prod, seqty1,
   and all in the algebra by a single aggregate operator ``aggr''
   that can handle multiple aggregates. The aggregate entries
   are of kind count, min, max, avg, sum, prod, seqty1, all, and dist.

-- Added new aggregate kind ``dist'' that allows to represent group by
   columns that functionally depend on the partitioning criterion
   in the result of the grouping aggregate.

-- Added rewrite that merges aggregates.

-- Added rewrite that removes superfluous aggregates.

-- Added rewrite that pushes a rank operator through an aggregate.

-- Extended the XML import to cope with the old
   as well as the new representation of aggregates.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


U prop_reqval.c
Index: prop_reqval.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/prop/prop_reqval.c,v
retrieving revision 1.55.2.1
retrieving revision 1.55.2.2
diff -u -d -r1.55.2.1 -r1.55.2.2
--- prop_reqval.c       7 May 2009 14:45:10 -0000       1.55.2.1
+++ prop_reqval.c       15 Jun 2009 12:46:46 -0000      1.55.2.2
@@ -510,14 +510,7 @@
     if (MAP_LIST(n) &&
         (MULTIPLE_INPUT_EDGES(n) ||
          n->kind == la_pos_select ||
-         n->kind == la_avg ||
-         n->kind == la_max ||
-         n->kind == la_min ||
-         n->kind == la_sum ||
-         n->kind == la_prod ||
-         n->kind == la_count ||
-         n->kind == la_seqty1 ||
-         n->kind == la_all ||
+         n->kind == la_aggr ||
          n->kind == la_rownum ||
          n->kind == la_rowrank ||
          n->kind == la_twig ||
@@ -855,16 +848,9 @@
                 adjust_value (n->sem.unary.col);
             break;
 
-        case la_avg:
-        case la_max:
-        case la_min:
-        case la_sum:
-        case la_prod:
-        case la_count:
-        case la_seqty1:
-        case la_all:
+        case la_aggr:
         {
-            PFarray_t *lmap = PFarray (sizeof (req_val_t), 2);
+            PFarray_t *lmap = PFarray (sizeof (req_val_t), n->schema.count);
             if (n->sem.aggr.part) {
                 /* keep properties */
                 req_val_t *map  = find_map (MAP_LIST(n), n->sem.aggr.part);
@@ -872,10 +858,11 @@
                 /* we only have to provide the same groups */
                 adjust_part_ (lmap, n->sem.aggr.part);
             }
-            if (n->sem.aggr.col)
-                /* to make up for the schema change
-                   we add the input columns by hand */
-                adjust_value_ (lmap, n->sem.aggr.col);
+            for (unsigned int i = 0; i < n->sem.aggr.count; i++)
+                if (n->sem.aggr.aggr[i].col)
+                    /* to make up for the schema change
+                       we add the input columns by hand */
+                    adjust_value_ (lmap, n->sem.aggr.aggr[i].col);
 
             prop_infer_reqvals (L(n), lmap);
         }   return; /* only infer once */


------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins

Reply via email to