Update of /cvsroot/monetdb/pathfinder/compiler/algebra/opt
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv5371/algebra/opt
Modified Files:
Tag: Feb2009
opt_thetajoin.c
Log Message:
-- 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.37.2.1
retrieving revision 1.37.2.2
diff -u -d -r1.37.2.1 -r1.37.2.2
--- opt_thetajoin.c 4 Feb 2009 14:24:30 -0000 1.37.2.1
+++ opt_thetajoin.c 9 Mar 2009 14:52:07 -0000 1.37.2.2
@@ -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);
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins