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

Modified Files:
      Tag: Feb2009
        prop_card.c 
Log Message:
-- 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.39.2.1
diff -u -d -r1.39 -r1.39.2.1
--- prop_card.c 8 Jan 2009 16:54:10 -0000       1.39
+++ prop_card.c 9 Mar 2009 14:52:39 -0000       1.39.2.1
@@ -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 */


------------------------------------------------------------------------------
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

Reply via email to