Update of /cvsroot/monetdb/pathfinder/compiler/algebra
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv3556/compiler/algebra
Modified Files:
Tag: M5XQ
algebra.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/algebra.c,1.108
-- 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 algebra.c
Index: algebra.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/algebra.c,v
retrieving revision 1.106.2.1
retrieving revision 1.106.2.2
diff -u -d -r1.106.2.1 -r1.106.2.2
--- algebra.c 7 May 2009 14:41:30 -0000 1.106.2.1
+++ algebra.c 15 Jun 2009 12:43:45 -0000 1.106.2.2
@@ -1257,6 +1257,36 @@
}
/**
+ * Print aggregate kind
+ */
+char *
+PFalg_aggr_kind_str (PFalg_aggr_kind_t kind)
+{
+ switch (kind) {
+ case alg_aggr_dist: return "distinct";
+ case alg_aggr_count: return "count";
+ case alg_aggr_min: return "min";
+ case alg_aggr_max: return "max";
+ case alg_aggr_avg: return "avg";
+ case alg_aggr_sum: return "sum";
+ case alg_aggr_seqty1: return "seqty1";
+ case alg_aggr_all: return "all";
+ case alg_aggr_prod: return "prod";
+ }
+ PFoops (OOPS_FATAL, "unknown aggregate kind (%i)", kind);
+ return NULL;
+}
+
+/**
+ * Construct an aggregate entry.
+ */
+PFalg_aggr_t
+PFalg_aggr (PFalg_aggr_kind_t kind, PFalg_col_t res, PFalg_col_t col)
+{
+ return (PFalg_aggr_t) { .kind = kind, .res = res, .col = col };
+}
+
+/**
* Construct a predicate.
*/
PFalg_sel_t PFalg_sel (PFalg_comp_t comp,
------------------------------------------------------------------------------
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