Changeset: e2528645f4e5 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e2528645f4e5 Modified Files: pathfinder/compiler/algebra/opt/opt_thetajoin.c Branch: default Log Message:
Fix rewrite flag (retain previous information in modify_binary_op) and remove thinking error in conflict detection (that prohibited a number of rewrites). diffs (47 lines): diff --git a/pathfinder/compiler/algebra/opt/opt_thetajoin.c b/pathfinder/compiler/algebra/opt/opt_thetajoin.c --- a/pathfinder/compiler/algebra/opt/opt_thetajoin.c +++ b/pathfinder/compiler/algebra/opt/opt_thetajoin.c @@ -413,7 +413,7 @@ * operator eventually collects other predicates and thus * becomes more selective. */ -static bool do_opt_mvd (PFla_op_t *p, bool modified); +static bool do_opt_mvd (PFla_op_t *p); static bool opt_mvd (PFla_op_t *p) @@ -434,12 +434,14 @@ for (unsigned int i = 0; i < PFLA_OP_MAXCHILD && p->child[i]; i++) modified = opt_mvd (p->child[i]) || modified; - return do_opt_mvd (p, modified); + return do_opt_mvd (p) || modified; } static bool -do_opt_mvd (PFla_op_t *p, bool modified) +do_opt_mvd (PFla_op_t *p) { + bool modified = false; + unsigned i, j; /** @@ -641,13 +643,13 @@ continue; } } else { + /* update the column name of the result column */ + RES_AT (pred, i) = p->sem.proj.items[j].new; + /* check if the result is used with two different names */ - for (; j < p->sem.proj.count; j++) + for (j++; j < p->sem.proj.count; j++) conflict |= (RES_AT (pred, i) == p->sem.proj.items[j].old); - - /* update the column name of the result column */ - RES_AT (pred, i) = p->sem.proj.items[j].new; } } _______________________________________________ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list