Changeset: df960a404307 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=df960a404307
Modified Files:
        gdk/gdk_join.c
Branch: partioned-hash
Log Message:

When using hashjoin, only create hash on parent bat if it is persistent.


diffs (23 lines):

diff --git a/gdk/gdk_join.c b/gdk/gdk_join.c
--- a/gdk/gdk_join.c
+++ b/gdk/gdk_join.c
@@ -1826,12 +1826,15 @@ hashjoin(BAT *r1, BAT *r2, BAT *l, BAT *
                return GDK_SUCCEED;
        }
 
+       rl = BUNfirst(r);
        if (VIEWtparent(r)) {
                BAT *b = BBPdescriptor(-VIEWtparent(r));
-               rl = (BUN) ((r->T->heap.base - b->T->heap.base) >> r->T->shift) 
+ BUNfirst(r);
-               r = b;
-       } else {
-               rl = BUNfirst(r);
+               if (b->batPersistence == PERSISTENT || BATcheckhash(b)) {
+                       /* only use parent's hash if it is persistent
+                        * or already has a hash */
+                       rl = (BUN) ((r->T->heap.base - b->T->heap.base) >> 
r->T->shift) + BUNfirst(r);
+                       r = b;
+               }
        }
        rh = rl + rend;
        rl += rstart;
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to