Changeset: cf7f8416d388 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/cf7f8416d388
Modified Files:
        monetdb5/optimizer/opt_mitosis.c
        sql/backends/monet5/sql_optimizer.c
Branch: Jul2021
Log Message:

small change, ie now that we do counts on the tid column, we should also base 
mito-partitioning on tid columns


diffs (31 lines):

diff --git a/monetdb5/optimizer/opt_mitosis.c b/monetdb5/optimizer/opt_mitosis.c
--- a/monetdb5/optimizer/opt_mitosis.c
+++ b/monetdb5/optimizer/opt_mitosis.c
@@ -94,10 +94,13 @@ OPTmitosisImplementation(Client cntxt, M
                }
 
                /* locate the largest non-partitioned table */
-               if (getModuleId(p) != sqlRef || (getFunctionId(p) != bindRef && 
getFunctionId(p) != bindidxRef))
+               if (getModuleId(p) != sqlRef ||
+                               (getFunctionId(p) != bindRef &&
+                                getFunctionId(p) != bindidxRef &&
+                                getFunctionId(p) != tidRef))
                        continue;
                /* don't split insert BATs */
-               if (getVarConstant(mb, getArg(p, 5)).val.ival == 1)
+               if (p->argc > 5 && getVarConstant(mb, getArg(p, 5)).val.ival == 
1)
                        continue;
                if (p->argc > 6)
                        continue;  /* already partitioned */
diff --git a/sql/backends/monet5/sql_optimizer.c 
b/sql/backends/monet5/sql_optimizer.c
--- a/sql/backends/monet5/sql_optimizer.c
+++ b/sql/backends/monet5/sql_optimizer.c
@@ -79,7 +79,7 @@ SQLgetSpace(mvc *m, MalBlkPtr mb, int pr
                        if (!t || isDeclaredTable(t))
                                continue;
                        c = mvc_bind_column(m, t, cname);
-                       if (!s)
+                       if (!c)
                                continue;
 
                        /* we have to sum the cost of all three components of a 
BAT */
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to