Changeset: effa408a7f35 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=effa408a7f35
Modified Files:
        gdk/gdk_private.h
        gdk/gdk_search.h
        sql/backends/monet5/datacell/dcoperator.c
        sql/backends/monet5/sql.mx
        sql/backends/monet5/sql_result.c
Branch: default
Log Message:

No need to export HASHremove.
Outside of GDK it was only used in the way HASHdestroy uses it, so use
that function instead.


diffs (75 lines):

diff --git a/gdk/gdk_private.h b/gdk/gdk_private.h
--- a/gdk/gdk_private.h
+++ b/gdk/gdk_private.h
@@ -76,6 +76,7 @@ int GDKunlink(const char *dir, const cha
 int HASHgonebad(BAT *b, const void *v);
 BUN HASHmask(BUN cnt);
 Hash *HASHnew(Heap *hp, int tpe, BUN size, BUN mask);
+void HASHremove(BAT *b);
 int HEAPalloc(Heap *h, size_t nitems, size_t itemsize);
 void HEAPcacheInit(void);
 int HEAP_check(Heap *h, HeapRepair *hr);
diff --git a/gdk/gdk_search.h b/gdk/gdk_search.h
--- a/gdk/gdk_search.h
+++ b/gdk/gdk_search.h
@@ -29,7 +29,6 @@
  * of mean size 4.  This was shown to be inferior to direct hashing
  * with integer anding. The new implementation reflects this.
  */
-gdk_export void HASHremove(BAT *b);
 gdk_export void HASHdestroy(BAT *b);
 gdk_export BUN HASHprobe(Hash *h, const void *v);
 gdk_export BUN HASHlist(Hash *h, BUN i);
diff --git a/sql/backends/monet5/datacell/dcoperator.c 
b/sql/backends/monet5/datacell/dcoperator.c
--- a/sql/backends/monet5/datacell/dcoperator.c
+++ b/sql/backends/monet5/datacell/dcoperator.c
@@ -121,10 +121,7 @@ str DCdeleteUpperSlice(int *ret, int *bi
        assert(b != NULL);
 
        /* remove Hashes etc */
-       if (b->H->hash)
-               HASHremove(b);
-       if (b->T->hash)
-               HASHremove(BATmirror(b));
+       HASHdestroy(b);
 
        size = BATcount(b);
        writerT = (int *) Tloc(b, BUNfirst(b));
@@ -166,10 +163,7 @@ str DCreplaceTailBasedOnHead(int *ret, i
 
 
        /* remove Hashes etc */
-       if (r->H->hash)
-               HASHremove(r);
-       if (r->T->hash)
-               HASHremove(BATmirror(r));
+       HASHdestroy(r);
 
        size_r = BATcount(r);
        size_b = BATcount(b);
diff --git a/sql/backends/monet5/sql.mx b/sql/backends/monet5/sql.mx
--- a/sql/backends/monet5/sql.mx
+++ b/sql/backends/monet5/sql.mx
@@ -6984,8 +6984,7 @@ SQLdrop_hash(Client cntxt, MalBlkPtr mb,
                b = store_funcs.bind_col(m->session->tr, c, RDONLY);
                if (b == NULL) 
                        throw(SQL,"sql.drop_hash","Can not access descriptor");
-               HASHremove(b);
-               HASHremove(BATmirror(b));
+               HASHdestroy(b);
                BBPreleaseref(b->batCacheid);
        }
        return MAL_SUCCEED;
diff --git a/sql/backends/monet5/sql_result.c b/sql/backends/monet5/sql_result.c
--- a/sql/backends/monet5/sql_result.c
+++ b/sql/backends/monet5/sql_result.c
@@ -655,8 +655,7 @@ mvc_import_table(Client cntxt, mvc *m, b
 
                                assert(b != NULL);
 
-                               HASHremove(b);
-                               HASHremove(BATmirror(b));
+                               HASHdestroy(b);
 
                                fmt[i].c[0] = b;
                                cnt = BATcount(b);
_______________________________________________
checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to