Changeset: 845be12bf070 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=845be12bf070
Modified Files:
gdk/gdk_cand.c
Branch: default
Log Message:
Fix searching candidate list index for masked candidates.
diffs (16 lines):
diff --git a/gdk/gdk_cand.c b/gdk/gdk_cand.c
--- a/gdk/gdk_cand.c
+++ b/gdk/gdk_cand.c
@@ -982,10 +982,8 @@ canditer_search(struct canditer *ci, oid
o %= 32;
if (p == ci->nvals - 1 && o >= ci->lastbit)
return next ? ci->ncand : BUN_NONE;
- if (ci->mask[p] & (1U << o))
- return count_mask_bits(ci, 0, p);
- if (next)
- return count_mask_bits(ci, 0, p) + 1;
+ if (next || ci->mask[p] & (1U << o))
+ return count_mask_bits(ci, 0, p) + (o == 0 ? 0 :
candmask_pop(ci->mask[p] << (32 - o))) + !(ci->mask[p] & (1U << o));
break;
}
return BUN_NONE;
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list