Changeset: 7d9770a4f864 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/7d9770a4f864
Modified Files:
        sql/backends/monet5/rel_bin.c
        sql/server/rel_select.c
        sql/test/BugTracker-2026/Tests/All
Branch: default
Log Message:

merged with Dec2025


diffs (58 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
@@ -714,10 +714,13 @@ exp_bin_conjunctive(backend *be, sql_exp
                        sql_subfunc *f = sql_bind_func(be->mvc, "sys", 
anti?"or":"and", bt, bt, F_FUNC, true, true);
                        assert(f);
                        s = stmt_binop(be, sin, s, NULL, f);
-               } else if (!reduce && !sin && sel1 && sel1->nrcols == 0) {
+               } else if (!reduce && !sin && sel1) {
                        sql_subfunc *f = sql_bind_func(be->mvc, "sys", 
anti?"or":"and", bt, bt, F_FUNC, true, true);
                        assert(f);
-                       s = stmt_binop(be, sel1, s, sin, f);
+                       if (sel1->nrcols == 0)
+                               s = stmt_binop(be, sel1, s, sin, f);
+                       else
+                               s = stmt_binop(be, s, sel1, sin, f);
                } else if (reduce && ((sel1 && (sel1->nrcols == 0 || s->nrcols 
== 0)) || c->type != e_cmp)) {
                        if (s->nrcols) {
                                if (sel1 && (sel1->nrcols == 0 || s->nrcols == 
0)) {
@@ -3647,7 +3650,7 @@ rel2bin_antijoin(backend *be, sql_rel *r
                                li = ls;
 
                        if (!en->next && !is_anti(e) && e->flag != cmp_notequal 
&&
-                               (constval || stmt_has_null(ls))) {
+                               (constval || stmt_has_null(ls) || 
stmt_has_null(rs))) {
                                join = stmt_tdiff2(be, ls, rs, NULL, 
is_semantics(e), is_any(e));
                                jexps = NULL;
                        } else {
diff --git a/sql/server/rel_select.c b/sql/server/rel_select.c
--- a/sql/server/rel_select.c
+++ b/sql/server/rel_select.c
@@ -4230,8 +4230,13 @@ rel_cast(sql_query *query, sql_rel **rel
                sql_subtype *et = exp_subtype(e);
                if (e->type == e_atom && !tpe->digits) {
                        if (e->l && (et->type->eclass == EC_NUM || 
et->type->eclass == EC_DEC)) {
-                               tpe->digits = atom_num_digits(e->l) + 1;
-                               tpe->scale = 1;
+                               if (et->digits && et->scale) {
+                                       tpe->digits = et->digits;
+                                       tpe->scale = et->scale;
+                               } else {
+                                       tpe->digits = atom_num_digits(e->l) + 1;
+                                       tpe->scale = 1;
+                               }
                                tpe = sql_bind_subtype(sql->sa, "decimal", 
tpe->digits, tpe->scale);
                        } else if (EC_VARCHAR(et->type->eclass)) {
                                char *s = E_ATOM_STRING(e);
diff --git a/sql/test/BugTracker-2026/Tests/All 
b/sql/test/BugTracker-2026/Tests/All
--- a/sql/test/BugTracker-2026/Tests/All
+++ b/sql/test/BugTracker-2026/Tests/All
@@ -129,5 +129,5 @@ KNOWNFAIL?7931-rel2bin_select-assertion-
 7932-canditer_init-assertion-failure
 7933-query-without-result-bug
 7934-ALGouterselect-assertion-failure
-KNOWNFAIL?7937-where-not-in-values-null-bug
-KNOWNFAIL?7938-not-x-is-const-and-x-is-not-null-bug
+7937-where-not-in-values-null-bug
+7938-not-x-is-const-and-x-is-not-null-bug
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to