Changeset: 556e748fc554 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/556e748fc554
Modified Files:
monetdb5/modules/mal/pp_hash.c
Branch: pp_hashjoin
Log Message:
handle small nil casting issue
diffs (34 lines):
diff --git a/monetdb5/modules/mal/pp_hash.c b/monetdb5/modules/mal/pp_hash.c
--- a/monetdb5/modules/mal/pp_hash.c
+++ b/monetdb5/modules/mal/pp_hash.c
@@ -1895,11 +1895,12 @@ OAHASHnprobe(Client ctx, bat *PRB_oid, b
#define BATfoprobe(Type, BaseType) \
do { \
+ BaseType nil = *(BaseType*)&Type##_nil; \
Type *ky = Tloc(k, 0); \
Type *vals = ht->vals; \
\
if (any) { \
- gid k =
(gid)_hash_##Type(*(BaseType*)(&Type##_nil))&ht->mask; \
+ gid k = (gid)_hash_##Type(nil)&ht->mask; \
gid slot = ht->gids[k]; \
while (slot && !is_##Type##_nil(vals[slot])) { \
k++; \
@@ -2553,6 +2554,7 @@ OAHASHprobe_cmbd(Client ctx, bat *PRB_oi
#define BATfoprobe_cmbd(Type, BaseType) \
do { \
+ BaseType nil = *(BaseType*)&Type##_nil; \
Type *ky = Tloc(k, 0); \
Type *vals = ht->vals; \
\
@@ -2586,7 +2588,7 @@ OAHASHprobe_cmbd(Client ctx, bat *PRB_oi
slt[mtdcnt2] = oid_nil; \
bit has_nil = false; \
if (any) { \
- gid hsh = (gid)combine(gi[i],
_hash_##Type(*(BaseType*)(&Type##_nil)), prime)&ht->mask; \
+ gid hsh = (gid)combine(gi[i],
_hash_##Type(nil), prime)&ht->mask; \
slot = ATOMIC_GET(ht->gids+hsh); \
while (slot && (pgids[slot] != gi[i] ||
!is_##Type##_nil(vals[slot]))) { \
hsh++; \
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]