Changeset: 4e773318a3bc for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4e773318a3bc
Modified Files:
        gdk/gdk_batop.c
Branch: Dec2016
Log Message:

Move destruction of unloaded hash forward.


diffs (27 lines):

diff --git a/gdk/gdk_batop.c b/gdk/gdk_batop.c
--- a/gdk/gdk_batop.c
+++ b/gdk/gdk_batop.c
@@ -443,6 +443,11 @@ BATappend(BAT *b, BAT *n, bit force)
                }
        }
 
+       if (b->thash == (Hash *) 1) {
+               /* don't bother first loading the hash to then
+                * change it */
+               HASHdestroy(b);
+       }
        /* if growing too much, remove the hash, else we maintain it */
        if (BATcheckhash(b) && (2 * b->thash->mask) < (BATcount(b) + sz)) {
                HASHdestroy(b);
@@ -538,11 +543,6 @@ BATappend(BAT *b, BAT *n, bit force)
                        return GDK_FAIL;
                }
 
-               if (b->thash == (Hash *) 1) {
-                       /* don't bother first loading the hash to then
-                        * change it */
-                       HASHdestroy(b);
-               }
                BATloop(n, p, q) {
                        const void *t = BUNtail(ni, p);
 
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to