Update of /cvsroot/monetdb/pathfinder/compiler/algebra/opt
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv18920/compiler/algebra/opt
Modified Files:
Tag: Nov2009
opt_monetxq.c
Log Message:
propagated changes of Wednesday Oct 07 2009
from the Aug2009_NFI branch to the Nov2009 branch
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2009/10/07 - boncz: compiler/algebra/opt/opt_monetxq.c,1.10.8.1
- performance fix in shredder: no more duplicate text node elimination
- performance fix in loop-lifted doc() evaluation
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
U opt_monetxq.c
Index: opt_monetxq.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/opt/opt_monetxq.c,v
retrieving revision 1.10
retrieving revision 1.10.6.1
diff -u -d -r1.10 -r1.10.6.1
--- opt_monetxq.c 12 May 2009 16:12:10 -0000 1.10
+++ opt_monetxq.c 7 Oct 2009 15:46:44 -0000 1.10.6.1
@@ -245,6 +245,31 @@
RL(p) = RLL(p);
break;
+ case la_attach:
+ /* If the attach column is the only result it might
+ be benefitial to return only a single row
+ (the attach column without duplicates). */
+ if (PFprop_set (p->prop) &&
+ PFprop_icols_count (p->prop) == 1 &&
+ PFprop_icol (p->prop, p->sem.attach.res)) {
+ PFalg_col_t col = p->sem.attach.res;
+ PFalg_proj_t *proj = PFmalloc (p->schema.count *
+ sizeof (PFalg_proj_t));
+
+ /* fill the projection list of the upper projection (proj) */
+ for (unsigned int i = 0; i < p->schema.count; i++)
+ proj[i] = PFalg_proj (p->schema.items[i].name, col);
+
+ *p = *PFla_project_ (
+ PFla_distinct (
+ PFla_project (
+ PFla_attach (L(p), col, p->sem.attach.value),
+ PFalg_proj (col, col))),
+ p->schema.count,
+ proj);
+ }
+ break;
+
default:
break;
}
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins