Update of /cvsroot/monetdb/pathfinder/compiler/algebra/prop
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv5512/algebra/prop
Modified Files:
Tag: Feb2009
prop_composite_key.c
Log Message:
-- 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.29.2.1
diff -u -d -r1.29 -r1.29.2.1
--- prop_composite_key.c 22 Jan 2009 17:07:01 -0000 1.29
+++ prop_composite_key.c 9 Mar 2009 14:53:54 -0000 1.29.2.1
@@ -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));
+ }
}
}
------------------------------------------------------------------------------
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