Changeset: 5180aba894c4 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/5180aba894c4
Modified Files:
sql/server/rel_unnest.c
Branch: label
Log Message:
small code cleanup
diffs (23 lines):
diff --git a/sql/server/rel_unnest.c b/sql/server/rel_unnest.c
--- a/sql/server/rel_unnest.c
+++ b/sql/server/rel_unnest.c
@@ -1530,7 +1530,7 @@ push_up_set(mvc *sql, sql_rel *rel, list
if (need_distinct || need_distinct(s))
set_distinct(ns);
- if (is_join(rel->op)) {
+ if (is_join(rel->op) && !is_semi(rel->op)) {
list *sexps = sa_list(sql->sa), *dexps =
rel_projections(sql, d, NULL, 1, 1);
for (node *m = dexps->h; m; m = m->next) {
sql_exp *e = m->data;
@@ -1542,8 +1542,8 @@ push_up_set(mvc *sql, sql_rel *rel, list
/* add/remove projections to inner parts of the union
(as we push a join or semijoin down) */
ns->l = rel_project(sql->sa, ns->l,
rel_projections(sql, ns->l, NULL, 1, 1));
ns->r = rel_project(sql->sa, ns->r,
rel_projections(sql, ns->r, NULL, 1, 1));
- if (is_semi(rel->op))
- ns->exps = rel_projections(sql, ns->r, NULL, 1,
1);
+ if (is_semi(rel->op)) /* only push left side of
semi/anti join */
+ ns->exps = rel_projections(sql, ns->l, NULL, 1,
1);
if (rel->op == op_anti && s->op == op_union)
ns->op = op_inter;
if (rel->op == op_anti && s->op == op_inter)
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]