Update of /cvsroot/monetdb/pathfinder/compiler/algebra
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv21826/compiler/algebra
Modified Files:
Tag: PF_ROX
algebra_cse.c builtins.c core2alg.brg logical.c planner.c
Log Message:
propagated changes of Thursday Jun 05 2008 - Friday Jun 06 2008
from the development trunk to the PF_ROX branch
U core2alg.brg
Index: core2alg.brg
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/core2alg.brg,v
retrieving revision 1.60.4.9
retrieving revision 1.60.4.10
diff -u -d -r1.60.4.9 -r1.60.4.10
--- core2alg.brg 2 Jun 2008 20:27:21 -0000 1.60.4.9
+++ core2alg.brg 6 Jun 2008 14:25:32 -0000 1.60.4.10
@@ -3067,13 +3067,17 @@
* A(L(p)).rel contains a axis node with information on the
* location step. Will be read out in PFla_step().
*/
- PFla_op_t *step = PFla_step_simple (
- PFla_set_to_la (p.frag),
- project (p.rel,
- proj (att_iter, att_iter),
- proj (att_item, att_item)),
- locstep_spec (axis, ty),
- att_iter, att_item, att_item);
+ PFla_op_t *step = PFla_project (
+ PFla_step_join_simple (
+ PFla_set_to_la (p.frag),
+ project (p.rel,
+ proj (att_iter, att_iter),
+ proj (att_item, att_item)),
+ locstep_spec (axis, ty),
+ att_item,
+ att_item1),
+ PFalg_proj (att_iter, att_iter),
+ PFalg_proj (att_item, att_item1));
if (ORDERING)
return (struct PFla_pair_t) {
U algebra_cse.c
Index: algebra_cse.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/algebra_cse.c,v
retrieving revision 1.65.4.6
retrieving revision 1.65.4.7
diff -u -d -r1.65.4.6 -r1.65.4.7
--- algebra_cse.c 30 May 2008 12:36:24 -0000 1.65.4.6
+++ algebra_cse.c 6 Jun 2008 14:25:31 -0000 1.65.4.7
@@ -224,14 +224,21 @@
rcount != PFarray_last (b->sem.eqjoin_unq.rproj))
return false;
- for (i = 0; i < lcount; i++) {
#define proj_at(l,i) (*(PFalg_proj_t *) PFarray_at ((l),(i)))
+ for (i = 0; i < lcount; i++) {
aproj = proj_at(a->sem.eqjoin_unq.lproj, i),
bproj = proj_at(b->sem.eqjoin_unq.lproj, i);
if (aproj.old != bproj.old || aproj.new != bproj.new)
return false;
}
+ for (i = 0; i < rcount; i++) {
+ aproj = proj_at(a->sem.eqjoin_unq.rproj, i),
+ bproj = proj_at(b->sem.eqjoin_unq.rproj, i);
+ if (aproj.old != bproj.old || aproj.new != bproj.new)
+ return false;
+ }
+
return true;
} break;
U planner.c
Index: planner.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/planner.c,v
retrieving revision 1.47.2.11
retrieving revision 1.47.2.12
diff -u -d -r1.47.2.11 -r1.47.2.12
--- planner.c 2 Jun 2008 20:27:21 -0000 1.47.2.11
+++ planner.c 6 Jun 2008 14:25:33 -0000 1.47.2.12
@@ -631,8 +631,10 @@
static PFplanlist_t *
plan_unique_thetajoin (const PFla_op_t *n)
{
- PFplanlist_t *ret = new_planlist ();
- PFalg_att_t ldist, rdist;
+ PFplanlist_t *ret = new_planlist (),
+ *lsorted = new_planlist (),
+ *rsorted = new_planlist ();
+ PFalg_att_t ldist, rdist;
PFalg_simple_type_t cur_type;
@@ -669,8 +671,23 @@
cur_type & aat_node)
return ret;
- for (unsigned int l = 0; l < PFarray_last (L(LL(n))->plans); l++)
- for (unsigned int r = 0; r < PFarray_last (R(LL(n))->plans); r++) {
+ /* make sure the left input is sorted by the left sort criterion */
+ for (unsigned int i = 0; i < PFarray_last (L(LL(n))->plans); i++)
+ add_plans (lsorted,
+ ensure_ordering (
+ *(plan_t **) PFarray_at (L(LL(n))->plans, i),
+ sortby (ldist)));
+
+ /* make sure the right input is sorted by the right sort criterion */
+ for (unsigned int i = 0; i < PFarray_last (R(LL(n))->plans); i++)
+ add_plans (rsorted,
+ ensure_ordering (
+ *(plan_t **) PFarray_at (R(LL(n))->plans, i),
+ sortby (rdist)));
+
+ /* combine each plan in R with each plan in S */
+ for (unsigned int l = 0; l < PFarray_last (lsorted); l++)
+ for (unsigned int r = 0; r < PFarray_last (rsorted); r++) {
add_plan (ret,
/* add the renaming projection afterwards */
project (
@@ -684,8 +701,8 @@
LL(n)->sem.thetajoin.pred[0].right,
ldist,
rdist,
- *(plan_t **) PFarray_at (L(LL(n))->plans, l),
- *(plan_t **) PFarray_at (R(LL(n))->plans, r)),
+ *(plan_t **) PFarray_at (lsorted, l),
+ *(plan_t **) PFarray_at (rsorted, r)),
2,
L(n)->sem.proj.items));
@@ -704,8 +721,8 @@
LL(n)->sem.thetajoin.pred[0].left,
rdist,
ldist,
- *(plan_t **) PFarray_at (R(LL(n))->plans, r),
- *(plan_t **) PFarray_at (L(LL(n))->plans,
l)),
+ *(plan_t **) PFarray_at (rsorted, r),
+ *(plan_t **) PFarray_at (lsorted, l)),
2,
L(n)->sem.proj.items));
}
U logical.c
Index: logical.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/logical.c,v
retrieving revision 1.78.2.11
retrieving revision 1.78.2.12
diff -u -d -r1.78.2.11 -r1.78.2.12
--- logical.c 31 May 2008 11:45:09 -0000 1.78.2.11
+++ logical.c 6 Jun 2008 14:25:33 -0000 1.78.2.12
@@ -2368,11 +2368,18 @@
{
if (pos)
assert_ty = n->schema.items[i].type & ty;
- else
+ else {
/* the restricted type assert_ty is the original
type without type ty */
assert_ty = n->schema.items[i].type -
(n->schema.items[i].type & ty);
+ /* make sure that all node type bits are retained */
+ if (assert_ty & aat_nkind)
+ assert_ty = assert_ty | aat_pre | aat_frag;
+ /* make sure that all attr type bits are retained */
+ if (assert_ty & aat_attr)
+ assert_ty = assert_ty | aat_pre | aat_frag;
+ }
break;
}
U builtins.c
Index: builtins.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/builtins.c,v
retrieving revision 1.75.2.11
retrieving revision 1.75.2.12
diff -u -d -r1.75.2.11 -r1.75.2.12
--- builtins.c 2 Jun 2008 20:27:21 -0000 1.75.2.11
+++ builtins.c 6 Jun 2008 14:25:32 -0000 1.75.2.12
@@ -4592,14 +4592,14 @@
/* retrieve all descendant textnodes (`/descendant-or-self::text()') */
node_scj = rank (
- PFla_step_simple (
+ PFla_step_join_simple (
PFla_set_to_la (args[0].frag),
project (args[0].rel,
proj (att_iter, att_iter),
proj (att_item, att_item)),
desc_text_spec,
- att_iter, att_item, att_item),
- att_pos, sortby (att_item));
+ att_item, att_item1),
+ att_pos, sortby (att_item1));
/* concatenate all texts within an iteration using
the empty string as delimiter */
@@ -4608,7 +4608,7 @@
doc_access (
PFla_set_to_la (args[0].frag),
node_scj,
- att_res, att_item, doc_text),
+ att_res, att_item1, doc_text),
proj (att_iter, att_iter),
proj (att_pos, att_pos),
proj (att_item, att_res)),
@@ -4679,14 +4679,14 @@
/* retrieve all descendant textnodes (`/descendant-or-self::text()') */
node_scj = rank (
- PFla_step_simple (
+ PFla_step_join_simple (
PFla_set_to_la (args[0].frag),
project (sel_node,
proj (att_iter, att_iter),
proj (att_item, att_item)),
desc_text_spec,
- att_iter, att_item, att_item),
- att_pos, sortby (att_item));
+ att_item, att_item1),
+ att_pos, sortby (att_item1));
/* concatenate all texts within an iteration using
the empty string as delimiter */
@@ -4695,7 +4695,7 @@
doc_access (
PFla_set_to_la (args[0].frag),
node_scj,
- att_res, att_item, doc_text),
+ att_res, att_item1, doc_text),
proj (att_iter, att_iter),
proj (att_pos, att_pos),
proj (att_item, att_res)),
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins