Changeset: 8bd0c60afaa4 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/8bd0c60afaa4
Modified Files:
sql/server/rel_unnest.c
Branch: default
Log Message:
for push_up_set keep distinct if we push down a semijoin.
diffs (20 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
@@ -1475,6 +1475,7 @@ push_up_set(mvc *sql, sql_rel *rel, list
if (rel && (is_join(rel->op) || is_semi(rel->op)) && is_dependent(rel))
{
int single = is_single(rel);
sql_rel *d = rel->l, *s = rel->r;
+ int need_distinct = is_semi(rel->op) && need_distinct(d);
/* left of rel should be a set */
if (d && is_distinct_set(sql, d, ad) && s && is_set(s->op)) {
@@ -1523,6 +1524,8 @@ push_up_set(mvc *sql, sql_rel *rel, list
set_single(ns);
if (need_distinct(s))
set_distinct(ns);
+ if (need_distinct)
+ set_distinct(ns);
if (is_join(rel->op)) {
list *sexps = sa_list(sql->sa), *dexps =
rel_projections(sql, d, NULL, 1, 1);
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]