Update of /cvsroot/monetdb/pathfinder/compiler/algebra/map
In directory 
sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv23023/compiler/algebra/map

Modified Files:
      Tag: PF_ROX
        intro_thetajoin.c map_ori_names.c map_unq_names.c 
Log Message:
propagated changes of Wednesday Jan 30 2008 - Saturday Feb 09 2008
from the development trunk to the PF_ROX branch


Index: intro_thetajoin.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/map/intro_thetajoin.c,v
retrieving revision 1.12
retrieving revision 1.12.4.1
diff -u -d -r1.12 -r1.12.4.1
--- intro_thetajoin.c   11 Jan 2008 10:46:57 -0000      1.12
+++ intro_thetajoin.c   9 Feb 2008 08:40:16 -0000       1.12.4.1
@@ -183,7 +183,6 @@
         case la_disjunion:
         case la_intersect:
         case la_difference:
-        case la_error:
         case la_distinct:
             break;
 
@@ -320,15 +319,11 @@
             break;
 
         case la_to:
-            if (LEFT_COLS(n) & n->sem.to.res) {
-                LEFT_COLS(n) = diff   (LEFT_COLS(n), n->sem.to.res);
-                LEFT_COLS(n) = union_ (LEFT_COLS(n), n->sem.to.att1);
-                LEFT_COLS(n) = union_ (LEFT_COLS(n), n->sem.to.att2);
+            if (LEFT_COLS(n) & n->sem.binary.res) {
+                LEFT_COLS(n) = diff (LEFT_COLS(n), n->sem.binary.res);
             }
-            if (RIGHT_COLS(n) & n->sem.to.res) {
-                RIGHT_COLS(n) = diff   (RIGHT_COLS(n), n->sem.to.res);
-                RIGHT_COLS(n) = union_ (RIGHT_COLS(n), n->sem.to.att1);
-                RIGHT_COLS(n) = union_ (RIGHT_COLS(n), n->sem.to.att2);
+            if (RIGHT_COLS(n) & n->sem.binary.res) {
+                RIGHT_COLS(n) = diff (RIGHT_COLS(n), n->sem.binary.res);
             }
             break;
 
@@ -443,13 +438,13 @@
             break;
 
         case la_doc_tbl:
-            if (LEFT_COLS(n) & n->sem.doc_tbl.item_res) {
-                LEFT_COLS(n) = diff   (LEFT_COLS(n), n->sem.doc_tbl.item_res);
-                LEFT_COLS(n) = union_ (LEFT_COLS(n), n->sem.doc_tbl.item);
+            if (LEFT_COLS(n) & n->sem.doc_tbl.res) {
+                LEFT_COLS(n) = diff   (LEFT_COLS(n), n->sem.doc_tbl.res);
+                LEFT_COLS(n) = union_ (LEFT_COLS(n), n->sem.doc_tbl.att);
             }
-            if (RIGHT_COLS(n) & n->sem.doc_tbl.item_res) {
-                RIGHT_COLS(n) = diff   (RIGHT_COLS(n), 
n->sem.doc_tbl.item_res);
-                RIGHT_COLS(n) = union_ (RIGHT_COLS(n), n->sem.doc_tbl.item);
+            if (RIGHT_COLS(n) & n->sem.doc_tbl.res) {
+                RIGHT_COLS(n) = diff   (RIGHT_COLS(n), n->sem.doc_tbl.res);
+                RIGHT_COLS(n) = union_ (RIGHT_COLS(n), n->sem.doc_tbl.att);
             }
             break;
 
@@ -500,6 +495,13 @@
             RIGHT_COLS(n) = att_NULL;
             break;
 
+        case la_error:
+            /* FIXME: for now we assume that a theta-join
+               cannot be pushed through an error */
+            LEFT_COLS(n)  = att_NULL;
+            RIGHT_COLS(n) = att_NULL;
+            break;
+
         case la_cond_err:
         case la_trace:
             /* propagate input columns to the left child ... */

Index: map_ori_names.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/map/map_ori_names.c,v
retrieving revision 1.26
retrieving revision 1.26.4.1
diff -u -d -r1.26 -r1.26.4.1
--- map_ori_names.c     11 Jan 2008 10:46:57 -0000      1.26
+++ map_ori_names.c     9 Feb 2008 08:40:16 -0000       1.26.4.1
@@ -486,11 +486,7 @@
             break;
 
         case la_to:
-            res = to (PROJ(LEFT, p),
-                      ONAME(p, p->sem.to.res),
-                      ONAME(p, p->sem.to.att1),
-                      ONAME(p, p->sem.to.att2),
-                      p->sem.to.part?ONAME(p, p->sem.to.part):att_NULL);
+            res = binary_op (PFla_to, p, map);
             break;
 
         case la_avg:
@@ -685,31 +681,9 @@
             break;
 
         case la_doc_tbl:
-            /* In case columns iter and item_in are identical columns
-               item_in and item_out cannot refer to the same original
-               name. Then we need to ensure that we correct the naming
-               upfront (as the physical translation relies on the fact
-               that item_in and item_out are identical columns). */
-            if (ONAME(p, p->sem.doc_tbl.item) !=
-                ONAME(p, p->sem.doc_tbl.item_res)) {
-                PFalg_att_t iter, item_in, item_out;
-                iter     = ONAME(p, p->sem.doc_tbl.iter);
-                item_in  = ONAME(p, p->sem.doc_tbl.item);
-                item_out = ONAME(p, p->sem.doc_tbl.item_res);
-
-                assert (item_in == iter);
-
-                res = doc_tbl (project (PROJ(LEFT, p),
-                                        proj (iter, iter),
-                                        proj (item_out, item_in)),
-                               iter,
-                               item_out,
-                               item_out);
-            } else
-                res = doc_tbl (PROJ(LEFT, p),
-                               ONAME(p, p->sem.doc_tbl.iter),
-                               ONAME(p, p->sem.doc_tbl.item),
-                               ONAME(p, p->sem.doc_tbl.item_res));
+            res = doc_tbl (SEC_PROJ(LEFT, p, p->sem.doc_tbl.res),
+                           ONAME(p, p->sem.doc_tbl.res),
+                           ONAME(p, p->sem.doc_tbl.att));
             break;
 
         case la_doc_access:
@@ -838,8 +812,9 @@
             break;
 
         case la_error:
-            res = error (PROJ(LEFT, p),
-                         PFprop_ori_name_left (p->prop, p->sem.err.att));
+            res = PFla_error_ (O(L(p)),
+                               PFprop_ori_name_left (p->prop, p->sem.err.att),
+                               PFprop_type_of (p, p->sem.err.att));
             break;
 
         case la_cond_err:

Index: map_unq_names.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/map/map_unq_names.c,v
retrieving revision 1.25
retrieving revision 1.25.4.1
diff -u -d -r1.25 -r1.25.4.1
--- map_unq_names.c     11 Jan 2008 10:46:57 -0000      1.25
+++ map_unq_names.c     9 Feb 2008 08:40:17 -0000       1.25.4.1
@@ -493,12 +493,7 @@
             break;
 
         case la_to:
-            res = to (U(L(p)),
-                      UNAME(p, p->sem.to.res),
-                      /* attribute att is stored only in child operator */
-                      UNAME(L(p), p->sem.to.att1),
-                      UNAME(L(p), p->sem.to.att2),
-                      p->sem.to.part?UNAME(p, p->sem.to.part):att_NULL);
+            res = binary_op (PFla_to, p, map);
             break;
 
         case la_avg:
@@ -645,11 +640,8 @@
 
         case la_doc_tbl:
             res = doc_tbl (U(L(p)),
-                           UNAME(p, p->sem.doc_tbl.iter),
-                           /* unique name of input attribute item is
-                              stored in the child operator only */
-                           UNAME(L(p), p->sem.doc_tbl.item),
-                           UNAME(p, p->sem.doc_tbl.item_res));
+                           UNAME(p, p->sem.doc_tbl.res),
+                           UNAME(p, p->sem.doc_tbl.att));
             break;
 
         case la_doc_access:
@@ -748,8 +740,11 @@
             break;
 
         case la_error:
-            res =  error (U(L(p)), UNAME(L(p), p->sem.err.att) );
+            res = PFla_error_ (U(L(p)),
+                               UNAME(L(p), p->sem.err.att),
+                               PFprop_type_of (p, p->sem.err.att));
             break;
+
         case la_cond_err:
             res = cond_err (U(L(p)), U(R(p)),
                             /* unique name of input attribute att is


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins

Reply via email to