Changeset: e37de2be0fae for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/e37de2be0fae
Modified Files:
gdk/gdk_join.c
gdk/gdk_select.c
Branch: Dec2023
Log Message:
Use batRole instead of BBP_status to decide whether to create a hash.
diffs (24 lines):
diff --git a/gdk/gdk_join.c b/gdk/gdk_join.c
--- a/gdk/gdk_join.c
+++ b/gdk/gdk_join.c
@@ -3669,7 +3669,7 @@ joincost(BAT *r, BUN lcount, struct cand
/* only count the cost of creating the hash for
* non-persistent bats */
MT_lock_set(&r->theaplock);
- if (!(BBP_status(r->batCacheid) & BBPEXISTING) /* ||
r->theap->dirty */ || GDKinmemory(r->theap->farmid))
+ if (r->batRole != PERSISTENT /* || r->theap->dirty */
|| GDKinmemory(r->theap->farmid))
rcost += cnt * 2.0;
MT_lock_unset(&r->theaplock);
#else
diff --git a/gdk/gdk_select.c b/gdk/gdk_select.c
--- a/gdk/gdk_select.c
+++ b/gdk/gdk_select.c
@@ -1758,7 +1758,7 @@ BATselect(BAT *b, BAT *s, const void *tl
}
}
}
- if (wanthash && !havehash) {
+ if (wanthash && !havehash && b->batRole != PERSISTENT) {
MT_lock_set(&b->theaplock);
if (++b->selcnt > 1000)
b->selcnt = 1000; /* limit value */
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]