Update of /cvsroot/monetdb/pathfinder/compiler/algebra/prop
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv4269/compiler/algebra/prop
Modified Files:
Tag: M5XQ
prop_fd.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_fd.c,1.8
-- 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_fd.c
Index: prop_fd.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/prop/prop_fd.c,v
retrieving revision 1.4.2.3
retrieving revision 1.4.2.4
diff -u -d -r1.4.2.3 -r1.4.2.4
--- prop_fd.c 16 May 2009 08:23:44 -0000 1.4.2.3
+++ prop_fd.c 15 Jun 2009 12:45:56 -0000 1.4.2.4
@@ -54,6 +54,8 @@
{
if (!fds) return false;
+ if (col1 == col2) return true;
+
for (unsigned int i = 0; i < PFarray_last (fds); i++)
if (col1 == ((fd_t *) PFarray_at (fds, i))->col1 &&
col2 == ((fd_t *) PFarray_at (fds, i))->col2)
@@ -136,15 +138,7 @@
case la_empty_tbl:
case la_ref_tbl:
case la_disjunion:
- case la_avg:
- case la_max:
- case la_min:
- case la_sum:
- case la_prod:
- case la_count:
case la_rownum:
- case la_seqty1:
- case la_all:
case la_step:
case la_guide_step:
case la_twig:
@@ -259,6 +253,12 @@
bulk_add_fds (fds, L(n));
break;
+ case la_aggr:
+ if (n->sem.aggr.part)
+ for (unsigned int i = 0; i < n->sem.aggr.count; i++)
+ add_fd (fds, n->sem.aggr.part, n->sem.aggr.aggr[i].col);
+ break;
+
case la_num_eq:
case la_num_gt:
case la_bool_and:
------------------------------------------------------------------------------
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