Changeset: 327c9fd6bd38 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=327c9fd6bd38 Modified Files: monetdb5/modules/atoms/batxml.c monetdb5/modules/mal/iterator.c Branch: viewless Log Message:
module iterator uses BATslice (creates a copy) instead of VIEWcreate diffs (43 lines): diff --git a/monetdb5/modules/atoms/batxml.c b/monetdb5/modules/atoms/batxml.c --- a/monetdb5/modules/atoms/batxml.c +++ b/monetdb5/modules/atoms/batxml.c @@ -1225,7 +1225,7 @@ BATxmlaggr(BAT **bnp, BAT *b, BAT *g, BA if (g && BATtdense(g)) { /* singleton groups: return group ID's (g's tail) and original * values from b */ - bn = VIEWcreate(g->tseqbase, b); + bn = BATslice(b, g->tseqbase, BATcount(g)); goto out; } diff --git a/monetdb5/modules/mal/iterator.c b/monetdb5/modules/mal/iterator.c --- a/monetdb5/modules/mal/iterator.c +++ b/monetdb5/modules/mal/iterator.c @@ -55,7 +55,7 @@ ITRnewChunk(lng *res, bat *vid, bat *bid throw(MAL, "chop.newChunk", INTERNAL_BAT_ACCESS); } cnt = BATcount(b); - view = VIEWcreate(b->hseqbase, b); + view = BATslice(b, 0, cnt); if (view == NULL) { BBPunfix(b->batCacheid); throw(MAL, "chop.newChunk", GDK_EXCEPTION); @@ -63,7 +63,7 @@ ITRnewChunk(lng *res, bat *vid, bat *bid /* printf("set bat chunk bound to " LLFMT " 0 - " BUNFMT "\n", *granule, MIN(cnt,(BUN) *granule)); */ - VIEWbounds(b, view, 0, MIN(cnt, (BUN) * granule)); + BATsetcount(view, MIN(cnt, (BUN) *granule)); *vid = view->batCacheid; BBPkeepref(view->batCacheid); BBPunfix(b->batCacheid); @@ -99,8 +99,7 @@ ITRnextChunk(lng *res, bat *vid, bat *bi } /* printf("set bat chunk bound to " BUNFMT " - " BUNFMT " \n", i, i+(BUN) *granule-1); */ - VIEWbounds(b, view, i, i + (BUN) * granule); - BAThseqbase(view, is_oid_nil(b->hseqbase) ? oid_nil : b->hseqbase + i); + view = BATslice(b, i, MIN (BATcount(b), i + (BUN) * granule)); BBPkeepref(*vid = view->batCacheid); BBPunfix(b->batCacheid); *res = i; _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list