Changeset: b3534ef02f43 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/b3534ef02f43
Modified Files:
        sql/backends/monet5/rel_bin.c
        sql/test/BugTracker-2026/Tests/8024-MALoptimizer-bug.test
        sql/test/BugTracker-2026/Tests/All
Branch: default
Log Message:

improved exp_conjunctive, first anti conjuctive projections was wrongfully 
combined with selection candidates


diffs (50 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
@@ -733,7 +733,7 @@ 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) {
+               } else if (!reduce && !first && !sin && sel1) {
                        sql_subfunc *f = sql_bind_func(be->mvc, "sys", 
anti?"or":"and", bt, bt, F_FUNC, true, true);
                        assert(f);
                        if (sel1->nrcols == 0)
diff --git a/sql/test/BugTracker-2026/Tests/8024-MALoptimizer-bug.test 
b/sql/test/BugTracker-2026/Tests/8024-MALoptimizer-bug.test
--- a/sql/test/BugTracker-2026/Tests/8024-MALoptimizer-bug.test
+++ b/sql/test/BugTracker-2026/Tests/8024-MALoptimizer-bug.test
@@ -14,8 +14,7 @@ SELECT count(*) FROM b2 WHERE (NOT (c0 A
 ----
 2
 
--- next query fails with: 42000!Error in optimizer defaultpipe: 
TypeException:user.main[17]:'calc.or' undefined in:     X_111:any := 
calc.or(X_107:bit, X_109:oid);
--- createExceptionInternal: ERROR: MALException:defaultpipe:42000!Error in 
optimizer defaultpipe: TypeException:user.main[17]:'calc.or' undefined in:     
X_111:any := calc.or(X_107:bit, X_109:oid);
+-- next query failed with: 42000!Error in optimizer defaultpipe: 
TypeException:user.main[17]:'calc.or' undefined in:     X_111:any := 
calc.or(X_107:bit, X_109:oid);
 query I nosort
 SELECT count(*) FROM b2 WHERE (c0 LIKE c0) = (NOT (c0 AND c1))
 ----
@@ -32,12 +31,6 @@ project (
 | ) [  ] [ "sys"."count"() as "%1"."%1" ]
 ) [ "%1"."%1" ]
 
--- next query fails with: 42000!Error in optimizer defaultpipe: 
TypeException:user.main[17]:'calc.or' undefined in:     X_111:any := 
calc.or(X_107:bit, X_109:oid);
-query T nosort
-EXPLAIN PHYSICAL SELECT count(*) FROM b2 WHERE (c0 LIKE c0) = (NOT (c0 AND c1))
-----
-
-
 query I nosort
 SELECT count(*) FROM b2 WHERE (c0 = c0)
 ----
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
@@ -201,7 +201,7 @@ KNOWNFAIL?8017-create-where-exists-selec
 KNOWNFAIL?8018-rel2bin_select-assert-failure
 KNOWNFAIL?8019-rel_bin-exp_bin-assert-failure
 KNOWNFAIL?8020-correlated-subquery-bug
-KNOWNFAIL?8024-MALoptimizer-bug
+8024-MALoptimizer-bug
 8025-having-count-bug
 8026-having-expression-bug
 8027-having-expression-issue
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to