Update of /cvsroot/monetdb/pathfinder/compiler/algebra/prop
In directory
23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv17353/compiler/algebra/prop
Modified Files:
prop_composite_key.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/prop/prop_composite_key.c,1.29.2.1
-- Restrict the composite key for equi-join operators.
(Remove one join column if both sides occur in key.)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
U prop_composite_key.c
Index: prop_composite_key.c
===================================================================
RCS file:
/cvsroot/monetdb/pathfinder/compiler/algebra/prop/prop_composite_key.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- prop_composite_key.c 22 Jan 2009 17:07:01 -0000 1.29
+++ prop_composite_key.c 10 Mar 2009 09:54:55 -0000 1.30
@@ -404,6 +404,19 @@
union_ (CKEYS,
clconcat (llat (LCKEYS, i),
llat (RCKEYS, j)));
+ /* if both join arguments together form a
+ composite key we can also drop one column */
+ if (in (llat (LCKEYS, i), n->sem.eqjoin.col1) &&
+ in (llat (RCKEYS, i), n->sem.eqjoin.col2)) {
+ union_ (CKEYS,
+ remove_col (clconcat (llat (LCKEYS, i),
+ llat (RCKEYS, j)),
+ n->sem.eqjoin.col1));
+ union_ (CKEYS,
+ remove_col (clconcat (llat (LCKEYS, i),
+ llat (RCKEYS, j)),
+ n->sem.eqjoin.col2));
+ }
}
}
------------------------------------------------------------------------------
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins