Update of /cvsroot/monetdb/pathfinder/compiler/algebra
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv3577/compiler/algebra
Modified Files:
Tag: M5XQ
algebra_cse.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_cse.c,1.85
-- 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_cse.c
Index: algebra_cse.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/algebra_cse.c,v
retrieving revision 1.81.2.3
retrieving revision 1.81.2.4
diff -u -d -r1.81.2.3 -r1.81.2.4
--- algebra_cse.c 30 May 2009 04:46:45 -0000 1.81.2.3
+++ algebra_cse.c 15 Jun 2009 12:43:50 -0000 1.81.2.4
@@ -370,22 +370,16 @@
&& a->sem.unary.res == b->sem.unary.res);
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:
- if (a->sem.aggr.col != b->sem.aggr.col
- || a->sem.aggr.res != b->sem.aggr.res)
+ case la_aggr:
+ if (a->sem.aggr.count != b->sem.aggr.count ||
+ a->sem.aggr.part != b->sem.aggr.part)
return false;
- /* either both aggregates are partitioned or none */
- /* partitioning column must be equal (if available) */
- if (a->sem.aggr.part != b->sem.aggr.part)
- return false;
+ for (unsigned int i = 0; i < a->sem.aggr.count; i++)
+ if (a->sem.aggr.aggr[i].kind != b->sem.aggr.aggr[i].kind ||
+ a->sem.aggr.aggr[i].res != b->sem.aggr.aggr[i].res ||
+ a->sem.aggr.aggr[i].col != b->sem.aggr.aggr[i].col)
+ return false;
return true;
------------------------------------------------------------------------------
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