Changeset: 422883b9c97f for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/422883b9c97f
Modified Files:
        gdk/gdk_calc.c
        gdk/gdk_join.c
        sql/backends/monet5/sql_statistics.c
Branch: Jul2021
Log Message:

Some small fixes.


diffs (65 lines):

diff --git a/gdk/gdk_calc.c b/gdk/gdk_calc.c
--- a/gdk/gdk_calc.c
+++ b/gdk/gdk_calc.c
@@ -10771,8 +10771,6 @@ BATcalccstdiv(const ValRecord *v, BAT *b
        bn = COLnew(ci.hseq, tp, ncand, TRANSIENT);
        if (bn == NULL)
                return NULL;
-       if (ncand == 0)
-               return bn;
 
        nils = div_typeswitchloop(VALptr(v), v->vtype, false,
                                  Tloc(b, 0), b->ttype, true,
diff --git a/gdk/gdk_join.c b/gdk/gdk_join.c
--- a/gdk/gdk_join.c
+++ b/gdk/gdk_join.c
@@ -1362,6 +1362,8 @@ mergejoin_cand(BAT **r1p, BAT **r2p, BAT
               bool nil_matches, BUN estimate, lng t0, bool swapped,
               const char *reason)
 {
+/* the comments in this function have not been checked after making a
+ * copy of mergejoin below and adapting it to a mask right-hand side */
        BAT *r1, *r2;
        BUN lstart, lend, lcnt;
        struct canditer lci, rci;
@@ -1536,28 +1538,6 @@ mergejoin_cand(BAT **r1p, BAT **r2p, BAT
                         * ordered anymore */
                        r1->trevsorted = false;
                }
-               if (nr > 1) {
-                       /* value occurs multiple times in r, so entry
-                        * in l will be repeated multiple times: hence
-                        * r1 is not key and not dense */
-                       r1->tkey = false;
-                       r1->tseqbase = oid_nil;
-                       /* multiple different values will be inserted
-                        * in r2 (in order), so not reverse ordered
-                        * anymore */
-                       if (r2) {
-                               r2->trevsorted = false;
-                               if (nl > 1) {
-                                       /* multiple values in l match
-                                        * multiple values in r, so an
-                                        * ordered sequence will be
-                                        * inserted multiple times in
-                                        * r2, so r2 is not ordered
-                                        * anymore */
-                                       r2->tsorted = false;
-                               }
-                       }
-               }
                if (BATcount(r1) > 0) {
                        /* a new, higher value will be inserted into
                         * r1, so r1 is not reverse ordered anymore */
diff --git a/sql/backends/monet5/sql_statistics.c 
b/sql/backends/monet5/sql_statistics.c
--- a/sql/backends/monet5/sql_statistics.c
+++ b/sql/backends/monet5/sql_statistics.c
@@ -223,6 +223,8 @@ sql_analyze(Client cntxt, MalBlkPtr mb, 
                                        br = BATselect(bn, bsample, 
ATOMnilptr(bn->ttype), NULL, true, false, false);
                                        if (br == NULL) {
                                                BBPunfix(bn->batCacheid);
+                                               if (bsample)
+                                                       
BBPunfix(bsample->batCacheid);
                                                /* XXX throw error instead? */
                                                continue;
                                        }
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to