Changeset: b4a6a34ed1f4 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b4a6a34ed1f4 Modified Files: gdk/gdk_cand.c Branch: linear-hashing Log Message:
First prune, then check for overlap. diffs (36 lines): diff --git a/gdk/gdk_cand.c b/gdk/gdk_cand.c --- a/gdk/gdk_cand.c +++ b/gdk/gdk_cand.c @@ -452,15 +452,6 @@ canditer_init(struct canditer *ci, BAT * /* exceptions must all be within range of s */ assert(ci->oids[0] >= ci->seq); assert(ci->oids[ci->noids - 1] < ci->seq + cnt + ci->noids); - if (b != NULL) { - if (ci->seq + cnt + ci->noids <= b->hseqbase || - ci->seq >= b->hseqbase + BATcount(b)) { - *ci = (struct canditer) { - .tpe = cand_dense, - }; - return 0; - } - } /* prune exceptions at either end of range of s */ while (ci->noids > 0 && ci->oids[0] == ci->seq) { ci->noids--; @@ -470,6 +461,16 @@ canditer_init(struct canditer *ci, BAT * while (ci->noids > 0 && ci->oids[ci->noids - 1] == ci->seq + cnt + ci->noids - 1) ci->noids--; + if (b != NULL) { + if (ci->seq + cnt + ci->noids <= b->hseqbase || + ci->seq >= b->hseqbase + BATcount(b)) { + /* candidate list does not overlap with b */ + *ci = (struct canditer) { + .tpe = cand_dense, + }; + return 0; + } + } if (ci->noids > 0) { if (b == NULL) break; _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list