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

Modified Files:
        opt_thetajoin.c 
Log Message:
-- Completed thetajoin fix from yesterday.


Index: opt_thetajoin.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/opt/opt_thetajoin.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- opt_thetajoin.c     15 Jan 2008 10:35:26 -0000      1.15
+++ opt_thetajoin.c     16 Jan 2008 12:24:54 -0000      1.16
@@ -1293,25 +1293,28 @@
                     unsigned int i;
                     PFalg_comp_t comp = alg_comp_eq;
 
+                    /* make sure that column res is not used as join argument 
*/
+                    resolve_name_conflict (L(p), res);
+                    
                     /* copy the predicates ... */
                     pred = PFarray_copy (L(p)->sem.thetajoin_opt.pred);
                     
                     /* ... and introduce a new predicate that makes
-                       the result column visible */
+                       the result column visible (as we do not know
+                       the comparison kind as well as the arguments
+                       we choose dummy ones)  */
                     *(pred_struct *) PFarray_add (pred) =
                         (pred_struct) {
-                            .comp      = comp, /* dummy comparison */
-                            .left      = att_NULL, /* dummy column */
-                            .right     = att_NULL, /* dummy column */
+                            .comp      = comp,                   /* dummy */
+                            .left      = LEFT_AT (pred, 0),      /* dummy */
+                            .right     = RIGHT_AT (pred, 0),     /* dummy */
                             .res       = res,
                             .persist   = false,
-                            .left_vis  = false, /* dummy column is invisible */
-                            .right_vis = false, /* dummy column is invisible */
+                            .left_vis  = LEFT_VIS_AT (pred, 0),  /* dummy */
+                            .right_vis = RIGHT_VIS_AT (pred, 0), /* dummy */
                             .res_vis   = true
                         };
 
-                    /* make sure that column res is not used as join argument 
*/
-                    resolve_name_conflict (L(p), res);
                     /* create a new thetajoin operator ... */
                     *p = *(thetajoin_opt (LL(p), LR(p), pred));
 


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