Update of /cvsroot/monetdb/pathfinder/compiler/sql
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv5967/sql

Modified Files:
        lalg2sql.brg 
Log Message:
-- Generate the selectivity clauses more selectively.


U lalg2sql.brg
Index: lalg2sql.brg
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/sql/lalg2sql.brg,v
retrieving revision 1.156
retrieving revision 1.157
diff -u -d -r1.156 -r1.157
--- lalg2sql.brg        16 Feb 2009 16:25:51 -0000      1.156
+++ lalg2sql.brg        9 Mar 2009 15:00:20 -0000       1.157
@@ -1091,6 +1091,15 @@
                     eq (LEVEL(ctx), LEVEL(step)));
 }
 
+static bool
+is_step (PFla_op_t *p)
+{
+    return p->kind == la_step ||
+           p->kind == la_guide_step ||
+           p->kind == la_step_join ||
+           p->kind == la_guide_step_join;
+}
+
 static void
 step_axis (PFla_op_t *p, PFsql_aident_t ctx, PFsql_aident_t step,
            PFalg_axis_t axis, PFsql_t *fragment, int level_in)
@@ -1118,7 +1127,7 @@
         case alg_chld:
         /* attribute axis */
         case alg_attr:
-            if (selectivity) {
+            if (selectivity && is_step (p)) {
                 if ((level_in == 0 || level_in == 1) &&
                     /* check for steps from a single document */
                     L(p)->kind == la_frag_union &&
@@ -1152,7 +1161,7 @@
 
         /* descendant-or-self axis */
         case alg_desc_s:
-            if (selectivity) {
+            if (selectivity && is_step (p)) {
                 if ((level_in == 0 || level_in == 1) &&
                     /* check for steps from a single document */
                     L(p)->kind == la_frag_union &&


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