Update of /cvsroot/monetdb/pathfinder/compiler/algebra/opt
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv28729/compiler/algebra/opt
Modified Files:
Tag: Aug2009_NFI
opt_algebra_cse.c opt_join_pd.c opt_mvd.c opt_rank.c
opt_thetajoin.c
Log Message:
enable heuristic rewrite value-selections in the algebra backend of
MonetDB/xQuery
has to properly implement pf:attribute(ctx, node, ns1, loc1, ns2, loc2) first,
as only the verion without namespaces was there (that one is now gone).
many restrictions:
- only non-loop-lifted equality tests
- not involving fn:collection or pf:collection (as path reversal in the latter
will never find the supernode)
- not involving any date/time/etc typed expressions (as the indices only work
for string and numerical equality)
went through the testweb and fixed all apparant problems
note the Aug2009_NFI value indices are full; whereas previously they would omit
frequent data items
U opt_algebra_cse.c
Index: opt_algebra_cse.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/opt/opt_algebra_cse.c,v
retrieving revision 1.53.6.1
retrieving revision 1.53.6.2
diff -u -d -r1.53.6.1 -r1.53.6.2
--- opt_algebra_cse.c 28 Sep 2009 23:20:25 -0000 1.53.6.1
+++ opt_algebra_cse.c 6 Oct 2009 17:22:49 -0000 1.53.6.2
@@ -1111,8 +1111,11 @@
ACTCOL (R(b), b->sem.doc_join.item)) &&
(ACTCOL (R(a), a->sem.doc_join.item_doc) ==
ACTCOL (R(b), b->sem.doc_join.item_doc)) &&
- (a->sem.doc_join.kind ==
- b->sem.doc_join.kind))
+ (a->sem.doc_join.kind == b->sem.doc_join.kind) &&
+ strcmp(a->sem.doc_join.ns1, b->sem.doc_join.ns1) == 0 &&
+ strcmp(a->sem.doc_join.loc1, b->sem.doc_join.loc1) == 0 &&
+ strcmp(a->sem.doc_join.ns2, b->sem.doc_join.ns2) == 0 &&
+ strcmp(a->sem.doc_join.loc2, b->sem.doc_join.loc2) == 0)
return true;
return false;
@@ -1847,7 +1850,11 @@
CSE(R(n))->schema,
n->sem.doc_join.item_res),
ACTCOL (R(n),
- n->sem.doc_join.item_doc));
+ n->sem.doc_join.item_doc),
+ n->sem.doc_join.ns1,
+ n->sem.doc_join.loc1,
+ n->sem.doc_join.ns2,
+ n->sem.doc_join.loc2);
case la_doc_tbl:
return PFla_doc_tbl (CSE(L(n)),
U opt_mvd.c
Index: opt_mvd.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/opt/opt_mvd.c,v
retrieving revision 1.54.6.1
retrieving revision 1.54.6.2
diff -u -d -r1.54.6.1 -r1.54.6.2
--- opt_mvd.c 28 Sep 2009 23:20:25 -0000 1.54.6.1
+++ opt_mvd.c 6 Oct 2009 17:22:50 -0000 1.54.6.2
@@ -1478,7 +1478,11 @@
p->sem.doc_join.kind,
p->sem.doc_join.item,
p->sem.doc_join.item_res,
- p->sem.doc_join.item_doc),
+ p->sem.doc_join.item_doc,
+ p->sem.doc_join.ns1,
+ p->sem.doc_join.loc1,
+ p->sem.doc_join.ns2,
+ p->sem.doc_join.loc2),
RR(p)));
modified = true;
}
@@ -1490,7 +1494,11 @@
p->sem.doc_join.kind,
p->sem.doc_join.item,
p->sem.doc_join.item_res,
- p->sem.doc_join.item_doc)));
+ p->sem.doc_join.item_doc,
+ p->sem.doc_join.ns1,
+ p->sem.doc_join.loc1,
+ p->sem.doc_join.ns2,
+ p->sem.doc_join.loc2))),
modified = true;
}
}
U opt_thetajoin.c
Index: opt_thetajoin.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/opt/opt_thetajoin.c,v
retrieving revision 1.46.6.1
retrieving revision 1.46.6.2
diff -u -d -r1.46.6.1 -r1.46.6.2
--- opt_thetajoin.c 28 Sep 2009 23:20:25 -0000 1.46.6.1
+++ opt_thetajoin.c 6 Oct 2009 17:22:50 -0000 1.46.6.2
@@ -1560,7 +1560,11 @@
p->sem.doc_join.kind,
p->sem.doc_join.item,
p->sem.doc_join.item_res,
- p->sem.doc_join.item_doc),
+ p->sem.doc_join.item_doc,
+ p->sem.doc_join.ns1,
+ p->sem.doc_join.loc1,
+ p->sem.doc_join.ns2,
+ p->sem.doc_join.loc2),
RR(p),
R(p)->sem.thetajoin_opt.pred));
modified = true;
@@ -1573,7 +1577,11 @@
p->sem.doc_join.kind,
p->sem.doc_join.item,
p->sem.doc_join.item_res,
- p->sem.doc_join.item_doc),
+ p->sem.doc_join.item_doc,
+ p->sem.doc_join.ns1,
+ p->sem.doc_join.loc1,
+ p->sem.doc_join.ns2,
+ p->sem.doc_join.loc2),
R(p)->sem.thetajoin_opt.pred));
modified = true;
}
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.64.6.1
retrieving revision 1.64.6.2
diff -u -d -r1.64.6.1 -r1.64.6.2
--- opt_join_pd.c 28 Sep 2009 23:20:25 -0000 1.64.6.1
+++ opt_join_pd.c 6 Oct 2009 17:22:49 -0000 1.64.6.2
@@ -1092,7 +1092,11 @@
lp->sem.doc_join.kind,
map_col (lp->sem.doc_join.item),
map_col (lp->sem.doc_join.item_res),
- map_col (lp->sem.doc_join.item_doc)));
+ map_col (lp->sem.doc_join.item_doc),
+ lp->sem.doc_join.ns1,
+ lp->sem.doc_join.loc1,
+ lp->sem.doc_join.ns2,
+ lp->sem.doc_join.loc2));
next_join = R(p);
}
break;
U opt_rank.c
Index: opt_rank.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/opt/opt_rank.c,v
retrieving revision 1.21.2.1.2.1
retrieving revision 1.21.2.1.2.2
diff -u -d -r1.21.2.1.2.1 -r1.21.2.1.2.2
--- opt_rank.c 28 Sep 2009 23:20:25 -0000 1.21.2.1.2.1
+++ opt_rank.c 6 Oct 2009 17:22:50 -0000 1.21.2.1.2.2
@@ -1184,7 +1184,11 @@
p->sem.doc_join.kind,
p->sem.doc_join.item,
p->sem.doc_join.item_res,
- p->sem.doc_join.item_doc),
+ p->sem.doc_join.item_doc,
+ p->sem.doc_join.ns1,
+ p->sem.doc_join.loc1,
+ p->sem.doc_join.ns2,
+ p->sem.doc_join.loc2),
R(p)->sem.rank_opt.res,
R(p)->sem.rank_opt.sortby));
modified = true;
------------------------------------------------------------------------------
Come build with us! The BlackBerry® 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/devconf
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins