Changeset: 21f35f636586 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=21f35f636586 Modified Files: sql/backends/monet5/rel_bin.c Branch: default Log Message:
Use right condition, if it's not reducing generate the projection version diffs (23 lines): diff --git a/sql/backends/monet5/rel_bin.c b/sql/backends/monet5/rel_bin.c --- a/sql/backends/monet5/rel_bin.c +++ b/sql/backends/monet5/rel_bin.c @@ -381,7 +381,7 @@ handle_in_exps(backend *be, sql_exp *ce, if (reduce && c->nrcols == 0) c = stmt_const(be, bin_first_column(be, left), c); - if (c->nrcols == 0 || (depth && !reduce)) { + if (c->nrcols == 0 || depth || !reduce) { sql_subtype *bt = sql_bind_localtype("bit"); sql_subfunc *cmp = (in) ?sql_bind_func(sql, "sys", "=", tail_type(c), tail_type(c), F_FUNC) @@ -400,9 +400,8 @@ handle_in_exps(backend *be, sql_exp *ce, s = stmt_binop(be, s, i, NULL, a); else s = i; - } - if (sel && !(depth && !reduce)) + if (sel && !(depth || !reduce)) s = stmt_uselect(be, stmt_const(be, bin_first_column(be, left), s), stmt_bool(be, 1), cmp_equal, sel, 0, 0); _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list