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

Modified Files:
        opt_complex.c 
Log Message:
-- Only rewrite if another rewrite sits in place to consume the rewritten plan.


U opt_complex.c
Index: opt_complex.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/opt/opt_complex.c,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -d -r1.73 -r1.74
--- opt_complex.c       9 Apr 2009 18:49:02 -0000       1.73
+++ opt_complex.c       20 Apr 2009 08:12:51 -0000      1.74
@@ -1939,21 +1939,21 @@
                     modified = true;
                     break;
                 }
-            }
-            /* Push a rowid operator underneath the adjacent
-               projection thus hoping to find a composite key
-               that allows to replace the rowid operator by
-               a rank operator. */
-            else if (L(p)->kind == la_project) {
-                PFalg_proj_t *proj = PFmalloc (p->schema.count *
-                                               sizeof (PFalg_proj_t));
-                PFalg_col_t   col  = PFcol_new (p->sem.rowid.res);
-                for (unsigned int i = 0; i < L(p)->sem.proj.count; i++)
-                    proj[i] = L(p)->sem.proj.items[i];
-                proj[L(p)->schema.count] = PFalg_proj (p->sem.rowid.res,
-                                                       col);
-                *p = *PFla_project_ (rowid (LL(p), col), p->schema.count, 
proj);
-                modified = true;
+                /* Push a rowid operator underneath the adjacent
+                   projection thus hoping to find a composite key
+                   that allows to replace the rowid operator by
+                   a rank operator. */
+                else if (L(p)->kind == la_project) {
+                    PFalg_proj_t *proj = PFmalloc (p->schema.count *
+                                                   sizeof (PFalg_proj_t));
+                    PFalg_col_t   col  = PFcol_new (p->sem.rowid.res);
+                    for (unsigned int i = 0; i < L(p)->sem.proj.count; i++)
+                        proj[i] = L(p)->sem.proj.items[i];
+                    proj[L(p)->schema.count] = PFalg_proj (p->sem.rowid.res,
+                                                           col);
+                    *p = *PFla_project_ (rowid (LL(p), col), p->schema.count, 
proj);
+                    modified = true;
+                }
             }
             break;
 


------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins

Reply via email to