Update of /cvsroot/monetdb/pathfinder/compiler/algebra/prop
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv8932/algebra/prop
Modified Files:
prop_dom.c
Log Message:
-- Based on the cardinality information try to keep for cross products
the same domain as their inputs.
U prop_dom.c
Index: prop_dom.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/prop/prop_dom.c,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -d -r1.57 -r1.58
--- prop_dom.c 10 Jun 2008 09:21:22 -0000 1.57
+++ prop_dom.c 24 Jun 2008 08:25:02 -0000 1.58
@@ -546,8 +546,37 @@
break;
case la_cross:
- /* we have to make sure to assign subdomains as otherwise
- dynamic empty relations might be ignored */
+ if (PFprop_card (R(n)->prop) > 0)
+ bulk_add_dom (n->prop, L(n));
+ else
+ /* we have to make sure to assign subdomains as otherwise
+ dynamic empty relations might be ignored */
+ /* create new subdomains for all attributes */
+ for (unsigned int i = 0; i < L(n)->schema.count; i++) {
+ add_subdom (n->prop,
+ PFprop_dom (L(n)->prop,
+ L(n)->schema.items[i].name),
+ id);
+ add_dom (n->prop, L(n)->schema.items[i].name, id);
+ id++;
+ }
+
+ if (PFprop_card (L(n)->prop) > 0)
+ bulk_add_dom (n->prop, R(n));
+ else
+ /* we have to make sure to assign subdomains as otherwise
+ dynamic empty relations might be ignored */
+ /* create new subdomains for all attributes */
+ for (unsigned int i = 0; i < R(n)->schema.count; i++) {
+ add_subdom (n->prop,
+ PFprop_dom (R(n)->prop,
+ R(n)->schema.items[i].name),
+ id);
+ add_dom (n->prop, R(n)->schema.items[i].name, id);
+ id++;
+ }
+ break;
+
case la_thetajoin:
/* As we do not know how multiple predicates interact
we assign subdomains for all attributes. */
@@ -1264,6 +1293,7 @@
void
PFprop_infer_dom (PFla_op_t *root)
{
+ PFprop_infer_card (root);
/*
* Initialize domain property inference with an empty domain
* relation list,
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins