Update of /cvsroot/monetdb/pathfinder/compiler/algebra
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv3652/compiler/algebra
Modified Files:
Tag: M5XQ
core2alg.brg
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/core2alg.brg,1.91
-- 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 core2alg.brg
Index: core2alg.brg
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/core2alg.brg,v
retrieving revision 1.89.2.1
retrieving revision 1.89.2.2
diff -u -d -r1.89.2.1 -r1.89.2.2
--- core2alg.brg 7 May 2009 14:41:48 -0000 1.89.2.1
+++ core2alg.brg 15 Jun 2009 12:44:00 -0000 1.89.2.2
@@ -3514,7 +3514,9 @@
static PFla_op_t *
type_test (PFty_t ty, PFla_pair_t e, PFla_op_t *loop)
{
- PFla_op_t *itemty;
+ PFalg_aggr_t aggr_item;
+ PFla_op_t *itemty,
+ *aggr;
/*
* Collect algebra expression with schema (iter,pos,itemty)
@@ -3653,6 +3655,10 @@
* Second part is the test for the occurence indicator.
*/
+ /* build a seqty1 aggregate */
+ aggr_item = PFalg_aggr (alg_aggr_seqty1, col_subty, col_itemty);
+ aggr = aggr (itemty, col_iter, 1, &aggr_item);
+
/*
* Ocurrence indicator `1' (exactly one item).
*
@@ -3673,7 +3679,7 @@
if (PFty_subtype (ty, PFty_item ()))
return
disjunion (
- seqty1 (itemty, col_subty, col_itemty, col_iter),
+ aggr,
attach (
difference (
loop,
@@ -3694,13 +3700,16 @@
if (PFty_subtype (ty, PFty_opt (PFty_item ())))
return
disjunion (
- seqty1 (itemty, col_subty, col_itemty, col_iter),
+ aggr,
attach (
difference (
loop,
project (itemty, proj (col_iter, col_iter))),
col_subty, lit_bln (true)));
+ /* turn the seqty1 aggregate into an all aggregate */
+ aggr->sem.aggr.aggr[0].kind = alg_aggr_all;
+
/*
* Ocurrence indicator `+' (one or more items).
*
@@ -3721,7 +3730,7 @@
if (PFty_subtype (ty, PFty_plus (PFty_item ())))
return
disjunion (
- all (itemty, col_subty, col_itemty, col_iter),
+ aggr,
attach (
difference (
loop,
@@ -3742,7 +3751,7 @@
if (PFty_subtype (ty, PFty_star (PFty_item ())))
return
disjunion (
- all (itemty, col_subty, col_itemty, col_iter),
+ aggr,
attach (
difference (
loop,
------------------------------------------------------------------------------
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