Update of /cvsroot/monetdb/pathfinder/compiler/debug
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv4760/compiler/debug
Modified Files:
Tag: M5XQ
logdebug.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/debug/logdebug.c,1.130
-- 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 logdebug.c
Index: logdebug.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/debug/logdebug.c,v
retrieving revision 1.124.2.3
retrieving revision 1.124.2.4
diff -u -d -r1.124.2.3 -r1.124.2.4
--- logdebug.c 13 May 2009 11:13:56 -0000 1.124.2.3
+++ logdebug.c 15 Jun 2009 12:47:06 -0000 1.124.2.4
@@ -80,12 +80,7 @@
, [la_bool_or ] = "OR"
, [la_bool_not] = "NOT"
, [la_to] = "op:to"
- , [la_avg] = "AVG"
- , [la_max] = "MAX"
- , [la_min] = "MIN"
- , [la_sum] = "SUM"
- , [la_prod] = "PROD"
- , [la_count] = "COUNT"
+ , [la_aggr] = "AGGR"
, [la_rownum] = "ROWNUM"
, [la_rowrank] = "ROWRANK"
, [la_rank] = "RANK"
@@ -93,8 +88,6 @@
, [la_type] = "TYPE"
, [la_type_assert] = "type assertion"
, [la_cast] = "CAST"
- , [la_seqty1] = "SEQTY1"
- , [la_all] = "ALL"
, [la_step] = "/|"
, [la_step_join] = "/|+"
, [la_guide_step] = "/| (guide)"
@@ -164,12 +157,7 @@
, [la_bool_or ] = "or"
, [la_bool_not] = "not"
, [la_to] = "op:to"
- , [la_avg] = "avg"
- , [la_max] = "max"
- , [la_min] = "min"
- , [la_sum] = "sum"
- , [la_prod] = "prod"
- , [la_count] = "count"
+ , [la_aggr] = "aggr"
, [la_rownum] = "rownum"
, [la_rowrank] = "rowrank"
, [la_rank] = "rank"
@@ -177,8 +165,6 @@
, [la_type] = "type"
, [la_type_assert] = "type assertion"
, [la_cast] = "cast"
- , [la_seqty1] = "seqty1"
- , [la_all] = "all"
, [la_step] = "XPath step"
, [la_step_join] = "path step join"
, [la_guide_step] = "XPath step (with guide information)"
@@ -424,12 +410,7 @@
, [la_bool_or ] = "#C0C0C0"
, [la_bool_not] = "#C0C0C0"
, [la_to] = "#C0C0C0"
- , [la_avg] = "#A0A0A0"
- , [la_max] = "#A0A0A0"
- , [la_min] = "#A0A0A0"
- , [la_sum] = "#A0A0A0"
- , [la_prod] = "#A0A0A0"
- , [la_count] = "#A0A0A0"
+ , [la_aggr] = "#A0A0A0"
, [la_rownum] = "#FF0000"
, [la_rowrank] = "#FF0000"
, [la_rank] = "#FF3333"
@@ -437,8 +418,6 @@
, [la_type] = "#C0C0C0"
, [la_type_assert] = "#C0C0C0"
, [la_cast] = "#C0C0C0"
- , [la_seqty1] = "#C0C0C0"
- , [la_all] = "#C0C0C0"
, [la_step] = "#1E90FF"
, [la_step_join] = "#1E9099"
, [la_guide_step] = "#007AE0"
@@ -729,32 +708,21 @@
PFcol_str (n->sem.unary.col));
break;
- case la_avg:
- case la_max:
- case la_min:
- case la_sum:
- case la_prod:
- case la_seqty1:
- case la_all:
- if (n->sem.aggr.part == col_NULL)
- PFarray_printf (DOT, "%s (%s:<%s>)", a_id[n->kind],
- PFcol_str (n->sem.aggr.res),
- PFcol_str (n->sem.aggr.col));
- else
- PFarray_printf (DOT, "%s (%s:<%s>/%s)", a_id[n->kind],
- PFcol_str (n->sem.aggr.res),
- PFcol_str (n->sem.aggr.col),
- PFcol_str (n->sem.aggr.part));
- break;
+ case la_aggr:
+ /* overwrite standard node layout */
+ PFarray_printf (DOT, "\", shape=polygon peripheries=2, label=\"");
- case la_count:
- if (n->sem.aggr.part == col_NULL)
- PFarray_printf (DOT, "%s (%s)", a_id[n->kind],
- PFcol_str (n->sem.aggr.res));
- else
- PFarray_printf (DOT, "%s (%s:/%s)", a_id[n->kind],
- PFcol_str (n->sem.aggr.res),
+ PFarray_printf (DOT, "%s", a_id[n->kind]);
+ if (n->sem.aggr.part != col_NULL)
+ PFarray_printf (DOT, " / %s",
PFcol_str (n->sem.aggr.part));
+
+ for (c = 0; c < n->sem.aggr.count; c++)
+ PFarray_printf (DOT, "\\n%s = %s (%s)",
+ PFcol_str (n->sem.aggr.aggr[c].res),
+ PFalg_aggr_kind_str (n->sem.aggr.aggr[c].kind),
+ n->sem.aggr.aggr[c].col
+ ? PFcol_str (n->sem.aggr.aggr[c].col) : "");
break;
case la_rownum:
@@ -2028,39 +1996,26 @@
PFcol_str (n->sem.unary.col));
break;
- case la_avg:
- case la_max:
- case la_min:
- case la_sum:
- case la_prod:
- case la_seqty1:
- case la_all:
- PFarray_printf (xml,
- " <content>\n"
- " <column name=\"%s\" new=\"true\"/>\n"
- " <column name=\"%s\" new=\"false\""
- " function=\"item\"/>\n",
- PFcol_str (n->sem.aggr.res),
- PFcol_str (n->sem.aggr.col));
+ case la_aggr:
+ PFarray_printf (xml, " <content>\n");
if (n->sem.aggr.part != col_NULL)
PFarray_printf (xml,
" <column name=\"%s\" function=\"partition\""
" new=\"false\"/>\n",
PFcol_str (n->sem.aggr.part));
- PFarray_printf (xml, " </content>\n");
-
- break;
-
- case la_count:
- PFarray_printf (xml,
- " <content>\n"
- " <column name=\"%s\" new=\"true\"/>\n",
- PFcol_str (n->sem.aggr.res));
- if (n->sem.aggr.part != col_NULL)
+ for (c = 0; c < n->sem.aggr.count; c++) {
PFarray_printf (xml,
- " <column name=\"%s\" function=\"partition\""
- " new=\"false\"/>\n",
- PFcol_str (n->sem.aggr.part));
+ " <aggregate kind=\"%s\">\n"
+ " <column name=\"%s\" new=\"true\"/>\n",
+ PFalg_aggr_kind_str (n->sem.aggr.aggr[c].kind),
+ PFcol_str (n->sem.aggr.aggr[c].res));
+ if (n->sem.aggr.aggr[c].col)
+ PFarray_printf (xml,
+ " <column name=\"%s\" new=\"false\""
+ " function=\"item\"/>\n",
+ PFcol_str (n->sem.aggr.aggr[c].col));
+ PFarray_printf (xml, " </aggregate>\n");
+ }
PFarray_printf (xml, " </content>\n");
break;
------------------------------------------------------------------------------
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