Update of /cvsroot/monetdb/pathfinder/compiler/algebra/prop
In directory 
sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv18481/compiler/algebra/prop

Modified Files:
      Tag: PF_ROX
        prop_dom.c 
Log Message:
propagated changes of Tuesday Jun 24 2008
from the development trunk to the PF_ROX branch

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2008/06/24 - sjoerd: NT/MonetDB4-XQuery/MonetDB4-XQuery-Installer.vdproj,1.16
        NT/MonetDB4-XQuery64/MonetDB4-XQuery-Installer.vdproj,1.8
propagated changes of Tuesday Jun 24 2008
from the XQuery_0-24 branch to the development trunk

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2008/06/24 - sjoerd:
        NT/MonetDB4-XQuery/MonetDB4-XQuery-Installer.vdproj,1.12.2.5
        NT/MonetDB4-XQuery64/MonetDB4-XQuery-Installer.vdproj,1.4.2.4
Updated version number.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2008/06/24 - tsheyar: compiler/algebra/prop/prop_dom.c,1.58
-- 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.47.4.7
retrieving revision 1.47.4.8
diff -u -d -r1.47.4.7 -r1.47.4.8
--- prop_dom.c  10 Jun 2008 14:47:34 -0000      1.47.4.7
+++ prop_dom.c  24 Jun 2008 09:37:43 -0000      1.47.4.8
@@ -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

Reply via email to