Update of /cvsroot/monetdb/pathfinder/compiler/algebra/opt
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv1908/compiler/algebra/opt
Modified Files:
Tag: M5XQ
opt_monetxq.c
Log Message:
propagated changes of Wednesday Apr 22 2009
from the development trunk to the M5XQ branch
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2009/04/22 - baschdi: compiler/algebra/opt/opt_monetxq.c,1.7
added more Documentation
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
U opt_monetxq.c
Index: opt_monetxq.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/opt/opt_monetxq.c,v
retrieving revision 1.6
retrieving revision 1.6.2.1
diff -u -d -r1.6 -r1.6.2.1
--- opt_monetxq.c 20 Apr 2009 08:10:31 -0000 1.6
+++ opt_monetxq.c 22 Apr 2009 14:27:36 -0000 1.6.2.1
@@ -248,12 +248,13 @@
/* action code */
switch (p->kind) {
- /*
- * |
- * project_(icols)
- * |
- * p
- * |
+ /* adding projection_(icols) over operator p to restrict the
+ * schema width
+ * |
+ * | project_(icols)
+ * p --> |
+ * | p
+ * |
*/
case la_attach:
case la_cross:
@@ -279,17 +280,22 @@
case la_doc_index_join:
case la_doc_access:
case la_roots:
+
+ /* add projection only if there are icols for the current
+ operator */
if (PFprop_icols_count(p->prop)) {
- /* look up required columns (icols) */
+ /* get the icols as collist */
PFalg_collist_t *icols = PFprop_icols_to_collist (p->prop);
+ /* allocate projection list with size of icol collist */
PFalg_proj_t *proj = PFmalloc (clsize (icols) *
sizeof (PFalg_proj_t));
- /* fill the projection list of the lower projection (proj1) */
+ /* fill the projection list with icols */
for (unsigned int i = 0; i < clsize (icols); i++)
proj[i] = PFalg_proj (clat (icols, i), clat (icols, i));
- /* Place a pi_(icols) operator on top of the operator. */
+ /* Place new projection operator on top of current operator
+ duplicating current opperator */
*p = *PFla_project_ (
PFla_op_duplicate (p, L(p), R(p)),
clsize (icols),
------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today.
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins