Changeset: f3a7fb236a54 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/f3a7fb236a54
Modified Files:
sql/backends/monet5/rel_bin.c
sql/backends/monet5/rel_physical.c
Branch: default
Log Message:
merged with march 2025
diffs (64 lines):
diff --git a/gdk/gdk_join.c b/gdk/gdk_join.c
--- a/gdk/gdk_join.c
+++ b/gdk/gdk_join.c
@@ -4083,7 +4083,9 @@ bitmaskjoin(BAT *l, BAT *r,
}
/* Make the implementation choices for various left joins.
- * If r3p is set, this is a "mark join" and *r3p will be a third return value
containing a bat with type msk with a bit set for each
+ * If r3p is set, this is a "mark join" and *r3p will be a third return
+ * value containing a bat with type bit that returns the "certainty" of
+ * the match (see BATmarkjoin).
* nil_matches: nil is an ordinary value that can match;
* nil_on_miss: outer join: fill in a nil value in case of no match;
* semi: semi join: return one of potentially more than one matches;
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
@@ -3682,6 +3682,23 @@ rel2bin_antijoin(backend *be, sql_rel *r
return stmt_list(be, l);
}
+static sql_rel *
+rel_has_partition_(visitor *v, sql_rel *rel)
+{
+ if (rel && is_basetable(rel->op))
+ v->changes |= (rel->flag & REL_PARTITION);
+ return rel;
+}
+
+static bool
+rel_has_partition(mvc *sql, sql_rel *rel)
+{
+ visitor v = { .sql = sql, .changes = 0 };
+
+ rel = rel_visitor_bottomup(&v, rel, &rel_has_partition_);
+ return v.changes;
+}
+
static stmt *
rel2bin_semijoin(backend *be, sql_rel *rel, list *refs)
{
@@ -3772,7 +3789,7 @@ rel2bin_semijoin(backend *be, sql_rel *r
if (!l || !r)
return NULL;
- if (/*be->no_mitosis &&*/
list_length(jexps) == 1 && list_empty(sexps) && rel->op == op_semi &&
!is_anti(e) && is_equi_exp_(e)) {
+ if (list_length(jexps) == 1 &&
list_empty(sexps) && rel->op == op_semi && !is_anti(e) && is_equi_exp_(e) &&
(rel_has_partition(be->mvc, rel->l) || be->no_mitosis)) {
join = stmt_semijoin(be,
column(be, l), column(be, r), left->cand, NULL/*right->cand*/, is_semantics(e),
false);
semijoin_only = 1;
en = NULL;
diff --git a/sql/backends/monet5/rel_physical.c
b/sql/backends/monet5/rel_physical.c
--- a/sql/backends/monet5/rel_physical.c
+++ b/sql/backends/monet5/rel_physical.c
@@ -225,9 +225,7 @@ rel_partition(mvc *sql, sql_rel *rel)
break;
case op_semi:
case op_anti:
- if (rel->l)
- rel_partition(sql, rel->l);
- break;
+
case op_inter:
case op_except:
if (rel->l)
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]