Update of /cvsroot/monetdb/pathfinder/compiler/include
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv4861/compiler/include

Modified Files:
      Tag: M5XQ
        logical.h 
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/include/logical.h,1.69
-- 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 logical.h
Index: logical.h
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/include/logical.h,v
retrieving revision 1.68
retrieving revision 1.68.2.1
diff -u -d -r1.68 -r1.68.2.1
--- logical.h   10 Mar 2009 12:20:43 -0000      1.68
+++ logical.h   15 Jun 2009 12:47:21 -0000      1.68.2.1
@@ -89,11 +89,7 @@
     , la_bool_or         = 29 /**< boolean OR operator */
     , la_bool_not        = 30 /**< boolean NOT operator */
     , la_to              = 31 /**< op:to operator */
-    , la_avg             = 32 /**< operator for (partitioned) avg of a column 
*/
-    , la_max             = 33 /**< operator for (partitioned) max of a column 
*/
-    , la_min             = 34 /**< operator for (partitioned) min of a column 
*/
-    , la_sum             = 35 /**< operator for (partitioned) sum of a column 
*/
-    , la_count           = 36 /**< (partitioned) row counting operator */
+    , la_aggr            = 32 /**< (partitioned) aggregate operator */
     /* Semantics of la_row_num, la_rowrank, la_rank, and la_rowid:
        - la_rownum behaves exactly like SQLs ROW_NUMBER. It is used to generate
          position values.
@@ -118,9 +114,6 @@
                                    certain type */
     , la_type_assert     = 42 /**< restricts the type of a relation */
     , la_cast            = 43 /**< type cast of a column */
-    , la_seqty1          = 44 /**< test for exactly one type occurrence in one
-                                   iteration (Pathfinder extension) */
-    , la_all             = 45 /**< test if all items in an iteration are true 
*/
     , la_step            = 50 /**< XPath location step */
     , la_step_join       = 51 /**< duplicate generating path step */
     , la_guide_step      = 52 /**< XPath location step
@@ -179,11 +172,8 @@
     /* builtin support for XQuery functions */
     , la_string_join     =102 /**< fn:string-join */
     
-    , la_prod           =110 /**< pf:product should be after la_sum */
-
     , la_dummy           =120 /**< dummy operator that does nothing */
 
-
 };
 /** algebra operator kinds */
 typedef enum PFla_op_kind_t PFla_op_kind_t;
@@ -312,15 +302,12 @@
 
     /*
      * semantic content for operators applying a
-     * (partitioned) aggregation function (count, sum, min, max and avg)
-     * on a column
-     * or a boolean grouping function (seqty1, all,...)
+     * (partitioned) aggregation function
      */
     struct {
-        PFalg_col_t     col;      /**< column to be used for the agg. func. */
-                                    /* Note that 'col' is ignored by la_count 
*/
         PFalg_col_t     part;     /**< partitioning column */
-        PFalg_col_t     res;      /**< column to hold the result */
+        unsigned int    count;    /**< length of the aggregate list */
+        PFalg_aggr_t   *aggr;     /**< aggregate list */
     } aggr;
 
     /* semantic content for rownumber, rowrank, and rank operator */
@@ -817,10 +804,10 @@
 
 /**
  * Constructor for operators forming the application of a
- * (partitioned) aggregation function (sum, min, max and avg) on a column.
+ * (partitioned) aggregation function.
  */
-PFla_op_t * PFla_aggr (PFla_op_kind_t kind, const PFla_op_t *n,
-                       PFalg_col_t res, PFalg_col_t col, PFalg_col_t part);
+PFla_op_t * PFla_aggr (const PFla_op_t *n, PFalg_col_t part,
+                       unsigned int count, PFalg_aggr_t *aggr);
 
 /** Constructor for (partitioned) row counting operators. */
 PFla_op_t * PFla_count (const PFla_op_t *n, PFalg_col_t res,
@@ -869,18 +856,6 @@
 PFla_op_t * PFla_cast (const PFla_op_t *n, PFalg_col_t res, PFalg_col_t col,
                        PFalg_simple_type_t ty);
 
-/** Constructor for sequence type matching operator for `1' occurrence */
-PFla_op_t * PFla_seqty1 (const PFla_op_t *n,
-                         PFalg_col_t res, PFalg_col_t col, PFalg_col_t part);
-
-/**
- * Constructor for `all' test.
- * (Do all tuples in partition @a part carry the value true in
- * column @a item ?)
- */
-PFla_op_t * PFla_all (const PFla_op_t *n, PFalg_col_t res,
-                      PFalg_col_t col, PFalg_col_t part);
-
 /**
  * Constructor for XPath step evaluation.
  */


------------------------------------------------------------------------------
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