Update of /cvsroot/monetdb/pathfinder/compiler/algebra/opt
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv26788/algebra/opt
Modified Files:
Tag: XQuery_0-24
opt_icol.c opt_join_pd.c
Log Message:
-- Re-implemented the join pushdown optimization phase
(due to incorrect rewrites).
o The special equi-join operator working on unique column
names now incorporates for each operand a projection.
Based on this projection we can now always maintain the
correct schema and push the join even through renaming
projections.
The old variant did in some cases 'forget' from which
operand of an equi-join columns with the same name stem
from.
o The new equi-join pushdown phase is a lot more effective
than the old one and thus generates very wide relations
(where a large number of columns can be pruned afterwards).
Placing a projection pushdown phase (icols optimization)
afterwards allows us to map the resulting plans back to
bit-encoded column names without running out of column
bits.
U opt_icol.c
Index: opt_icol.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/opt/opt_icol.c,v
retrieving revision 1.23
retrieving revision 1.23.2.1
diff -u -d -r1.23 -r1.23.2.1
--- opt_icol.c 3 Apr 2008 11:03:23 -0000 1.23
+++ opt_icol.c 28 May 2008 11:37:23 -0000 1.23.2.1
@@ -483,6 +483,15 @@
}
break;
+ case la_eqjoin_unq:
+ *p = *PFla_eqjoin_clone (L(p), R(p),
+ p->sem.eqjoin_unq.lproj,
+ p->sem.eqjoin_unq.rproj);
+ SEEN(p) = true;
+ /* let the constructor fix the projection
+ lists and the schema */
+ return;
+
default:
break;
}
U opt_join_pd.c
Index: opt_join_pd.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/opt/opt_join_pd.c,v
retrieving revision 1.46
retrieving revision 1.46.2.1
diff -u -d -r1.46 -r1.46.2.1
--- opt_join_pd.c 5 Apr 2008 08:20:33 -0000 1.46
+++ opt_join_pd.c 28 May 2008 11:37:25 -0000 1.46.2.1
@@ -16,7 +16,7 @@
* 4.) operators that fit into the 4. category and additionally require
* the cardinality to stay the same (rownum, rowid, attribute, and
* textnode constructor)
- * 5.) cross product operator
+ * 5.) cross product and thetajoin operators
* 6.) equi-join operator
* 7.) project operator
* The last four groups (4.-7.) require special treatment (for details
@@ -27,21 +27,6 @@
* transformation rule removes equi-joins that join the same relation
[...2167 lines suppressed...]
+
/* Optimize algebra tree */
- while (modified || tries < max_tries) {
+ while (modified || tries <= max_tries) {
+ PFprop_infer_refctr (root);
PFprop_infer_key (root);
/* key property inference already requires
the domain property inference for native
@@ -2216,11 +1707,6 @@
PFla_dag_reset (root);
if (!modified) tries++;
}
- /* remove duplicate columns introduced
- during rewriting */
- clean_up_eqjoin (root);
- PFla_dag_reset (root);
-
return root;
}
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins