Update of /cvsroot/monetdb/pathfinder/compiler/algebra/map
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv3836/compiler/algebra/map

Modified Files:
      Tag: M5XQ
        intro_thetajoin.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/map/intro_thetajoin.c,1.29
-- 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 intro_thetajoin.c
Index: intro_thetajoin.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/map/intro_thetajoin.c,v
retrieving revision 1.27.2.1
retrieving revision 1.27.2.2
diff -u -d -r1.27.2.1 -r1.27.2.2
--- intro_thetajoin.c   7 May 2009 14:42:35 -0000       1.27.2.1
+++ intro_thetajoin.c   15 Jun 2009 12:44:25 -0000      1.27.2.2
@@ -231,6 +231,7 @@
         case la_side_effects:
             /* a thetajoin cannot be pushed through
                a side effect list operator */
+            BOOL_COLS(n)  = NULL;
             LEFT_COLS(n)  = NULL;
             RIGHT_COLS(n) = NULL;
             break;
@@ -316,6 +317,7 @@
         }   break;
 
         case la_pos_select:
+            BOOL_COLS(n) = NULL;
             LEFT_COLS(n) = NULL;
             break;
 
@@ -420,27 +422,11 @@
             }
             break;
 
-        case la_avg:
-        case la_max:
-        case la_min:
-        case la_sum:
-        case la_prod:
-        case la_seqty1:
-        case la_all:
-            diff (BOOL_COLS(n),  n->sem.aggr.res);
-
-            if (in (LEFT_COLS(n), n->sem.aggr.res))
-                union_ (LEFT_COLS(n), n->sem.aggr.col);
-            if (in (RIGHT_COLS(n), n->sem.aggr.res))
-                union_ (RIGHT_COLS(n), n->sem.aggr.col);
-            diff (LEFT_COLS(n),  n->sem.aggr.res);
-            diff (RIGHT_COLS(n), n->sem.aggr.res);
-
-        case la_count:
-            /* keep partition columns for LEFT_COLS and RIGHT_COLS */
-
-            /* BOOL_COLS can never occur as partitioning as there
-               are no boolean partition criteria */
+        case la_aggr:
+            /* a theta-join cannot be pushed through an aggregate */
+            BOOL_COLS(n)  = NULL;
+            LEFT_COLS(n)  = NULL;
+            RIGHT_COLS(n) = NULL;
             break;
 
         case la_rownum:
@@ -558,6 +544,7 @@
         case la_content:
             /* FIXME: for now we assume that a theta-join
                cannot be pushed through a constructor */
+            BOOL_COLS(n)  = NULL;
             LEFT_COLS(n)  = NULL;
             RIGHT_COLS(n) = NULL;
             break;
@@ -565,6 +552,7 @@
         case la_merge_adjacent:
             /* FIXME: for now we assume that a theta-join
                cannot be pushed through an element constructor */
+            BOOL_COLS(n)  = NULL;
             LEFT_COLS(n)  = NULL;
             RIGHT_COLS(n) = NULL;
             break;
@@ -579,6 +567,7 @@
             /* for the fragment information we do not need to introduce
                column names as the thetajoin can never be moved along
                its edges. */
+            BOOL_COLS(n)  = NULL;
             LEFT_COLS(n)  = NULL;
             RIGHT_COLS(n) = NULL;
             break;
@@ -589,6 +578,7 @@
         case la_trace_msg:
         case la_trace_map:
             /* a theta-join cannot be pushed through */
+            BOOL_COLS(n)  = NULL;
             LEFT_COLS(n)  = NULL;
             RIGHT_COLS(n) = NULL;
             break;
@@ -599,6 +589,7 @@
         case la_rec_fix:
             /* FIXME: for now we assume that a theta-join
                cannot be pushed through a recursion operator */
+            BOOL_COLS(n)  = NULL;
             LEFT_COLS(n)  = NULL;
             RIGHT_COLS(n) = NULL;
             break;
@@ -613,6 +604,7 @@
         case la_fun_frag_param:
             /* FIXME: for now we assume that a theta-join
                cannot be pushed through a function application */
+            BOOL_COLS(n)  = NULL;
             LEFT_COLS(n)  = NULL;
             RIGHT_COLS(n) = NULL;
             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

Reply via email to