Changeset: 0815f8274736 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/0815f8274736
Modified Files:
        sql/server/rel_unnest.c
        sql/test/BugTracker-2026/Tests/All
Branch: Dec2025
Log Message:

pushing a left group join through a cross product will result in too many rows, 
we now remove the none used side from the corss. This solves issue #7896


diffs (36 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
@@ -1550,6 +1550,20 @@ push_up_join(mvc *sql, sql_rel *rel, lis
                                        return NULL;
                                return rel;
                        }
+                       if (is_left(rel->op) && !list_empty(rel->attr) && 
is_innerjoin(j->op) && list_empty(j->exps)) {
+                               /* remove any project, as we don't need */
+                               if (rd) { /* just throw away the left */
+                                       rel->r = rel_dup(jr);
+                                       rel_destroy(sql, j);
+                                       return rel;
+                               }
+                               if (ld) { /* just throw away the left */
+                                       rel->r = rel_dup(jl);
+                                       rel_destroy(sql, j);
+                                       return rel;
+                               }
+                               assert(0);
+                       }
 
                        if (ld && rd) {
                                node *m;
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
@@ -82,7 +82,7 @@ KNOWNFAIL?7774-insert-into-renamed-table
 7893-where-subqueries-sum-bug
 7894-subquery-where-not-bug
 7895-subquery-where-not-bug
-KNOWNFAIL?7896-where-ascii-comparison-bug
+7896-where-ascii-comparison-bug
 7897-exp_bin-assertion-failure
 7899-correlated-with-complex-and-or
 7903-query-without-result-bug
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to