Update of /cvsroot/monetdb/pathfinder/compiler/algebra/prop
In directory 
23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv17325/compiler/algebra/prop

Modified Files:
        prop_card.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_card.c,1.39.2.1
-- Correctly infer the cardinality for distinct operators.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


U prop_card.c
Index: prop_card.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/prop/prop_card.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- prop_card.c 8 Jan 2009 16:54:10 -0000       1.39
+++ prop_card.c 10 Mar 2009 09:54:50 -0000      1.40
@@ -81,7 +81,6 @@
         case la_pos_select:
         case la_intersect:
         case la_difference:
-        case la_distinct:
         case la_step:
         case la_step_join:
         case la_doc_index_join:
@@ -152,6 +151,14 @@
                             L(n)->prop->card + R(n)->prop->card : 0;
             break;
 
+        case la_distinct:
+            if (L(n)->prop->card == 1)
+                n->prop->card = 1;
+            else
+                /* can't say something specific about cardinality */
+                n->prop->card = 0;
+            break;
+
         case la_to:
             /* with constant information
                we could infer the cardinality better */


------------------------------------------------------------------------------
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins

Reply via email to