Update of /cvsroot/monetdb/pathfinder/compiler/debug
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv4778/compiler/debug

Modified Files:
      Tag: M5XQ
        physdebug.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/physdebug.c,1.79
-- 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 physdebug.c
Index: physdebug.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/debug/physdebug.c,v
retrieving revision 1.75.2.3
retrieving revision 1.75.2.4
diff -u -d -r1.75.2.3 -r1.75.2.4
--- physdebug.c 20 May 2009 16:28:37 -0000      1.75.2.3
+++ physdebug.c 15 Jun 2009 12:47:11 -0000      1.75.2.4
@@ -90,21 +90,14 @@
     , [pa_bool_or]         = "OR"
     , [pa_bool_not]        = "NOT"
     , [pa_to]              = "op:to"
-    , [pa_avg]             = "AVG"
-    , [pa_min]             = "MAX"
-    , [pa_max]             = "MIN"
-    , [pa_sum]             = "SUM"
-    , [pa_prod]            = "PRODUCT"
+    , [pa_aggr]            = "AGGR"
     , [pa_count_ext]       = "{COUNT}"
-    , [pa_count]           = "COUNT"
     , [pa_mark]            = "mark"
     , [pa_rank]            = "rank"
     , [pa_mark_grp]        = "mark_grp"
     , [pa_type]            = "TYPE"
     , [pa_type_assert]     = "type assertion"
     , [pa_cast]            = "CAST"
-    , [pa_seqty1]          = "SEQTY1"
-    , [pa_all]             = "ALL"
     , [pa_llscjoin]        = "//|"
     , [pa_llscjoin_dup]    = "//|+"
     , [pa_doc_tbl]         = "DOC"
@@ -241,21 +234,14 @@
         , [pa_bool_and]        = "\"#C0C0C0\""
         , [pa_bool_or]         = "\"#C0C0C0\""
         , [pa_to]              = "\"#C0C0C0\""
-        , [pa_avg]             = "\"#A0A0A0\""
-        , [pa_max]             = "\"#A0A0A0\""
-        , [pa_min]             = "\"#A0A0A0\""
-        , [pa_sum]             = "\"#A0A0A0\""
-        , [pa_prod]            = "\"#A0A0A0\""
+        , [pa_aggr]            = "\"#A0A0A0\""
         , [pa_count_ext]       = "\"#A0A0A0\""
-        , [pa_count]           = "\"#A0A0A0\""
         , [pa_mark]            = "\"#FFBBBB\""
         , [pa_rank]            = "\"#FFBBBB\""
         , [pa_mark_grp]        = "\"#FFBBBB\""
         , [pa_type]            = "\"#C0C0C0\""
         , [pa_type_assert]     = "\"#C0C0C0\""
         , [pa_cast]            = "\"#C0C0C0\""
-        , [pa_seqty1]          = "\"#A0A0A0\""
-        , [pa_all]             = "\"#A0A0A0\""
         , [pa_llscjoin]        = "\"#1E90FF\""
         , [pa_llscjoin_dup]    = "\"#1E9099\""
         , [pa_doc_tbl]         = "\"#C0C0C0\""
@@ -466,7 +452,6 @@
             break;
 
         case pa_count_ext:
-        case pa_count:
             if (n->sem.count.part == col_NULL)
                 PFarray_printf (dot, "%s (%s)", a_id[n->kind],
                                 PFcol_str (n->sem.count.res));
@@ -479,22 +464,21 @@
                                 PFcol_str (n->sem.count.loop));
             break;
 
-        case pa_avg:
-        case pa_max:
-        case pa_min:
-        case pa_sum:
-        case pa_prod:
-        case pa_seqty1:
-        case pa_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),
+        case pa_aggr:
+            /* overwrite standard node layout */
+            PFarray_printf (dot, "\", shape=polygon peripheries=2, label=\"");
+
+            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 pa_mark:


------------------------------------------------------------------------------
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

Reply via email to