Update of /cvsroot/monetdb/pathfinder/compiler/algebra/opt
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv17291/compiler/algebra/opt
Modified Files:
opt_thetajoin.c
Log Message:
propagated changes of Monday Mar 09 2009 - Tuesday Mar 10 2009
from the Feb2009 branch to the development trunk
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2009/03/09 - tsheyar: compiler/algebra/opt/opt_thetajoin.c,1.37.2.2
-- Thetajoin Optimization: Check for renaming in the result column.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
U opt_thetajoin.c
Index: opt_thetajoin.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/opt/opt_thetajoin.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- opt_thetajoin.c 6 Feb 2009 13:01:17 -0000 1.38
+++ opt_thetajoin.c 10 Mar 2009 09:54:45 -0000 1.39
@@ -580,7 +580,7 @@
PFalg_proj_t *proj_list1,
*proj_list2;
PFalg_col_t new_name;
- bool conflict;
+ bool conflict = false;
/* create projection lists */
proj_list1 = PFmalloc ((p->schema.count + PFarray_last (pred))
*
@@ -639,9 +639,15 @@
i--;
continue;
}
- } else
+ } else {
+ /* check if the result is used with two different
names */
+ for (; j < p->sem.proj.count; j++)
+ conflict |= (RES_AT (pred, i) ==
+ p->sem.proj.items[j].old);
+
/* update the column name of the result column */
RES_AT (pred, i) = p->sem.proj.items[j].new;
+ }
}
if (LEFT_VIS_AT (pred, i)) {
@@ -709,7 +715,6 @@
}
}
- conflict = false;
for (i = 0; i < count1; i++)
for (j = 0; j < count2; j++)
conflict |= (proj_list1[i].new == proj_list2[j].new);
------------------------------------------------------------------------------
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins