Changeset: 43913cae892d for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=43913cae892d Modified Files: gdk/gdk_bat.c gdk/gdk_batop.c Branch: rdf Log Message:
Merge with default branch For fixing the problem when count = 1 but the sorted prop. is not set diffs (49 lines): diff --git a/gdk/gdk_bat.c b/gdk/gdk_bat.c --- a/gdk/gdk_bat.c +++ b/gdk/gdk_bat.c @@ -990,6 +990,14 @@ BATcopy(BAT *b, int ht, int tt, int writ bn->tsorted = bn->trevsorted = (cnt <= 1 && BATatoms[b->ttype].linear); bn->tdense = bn->T->nonil = 0; } + if (BATcount(bn) <= 1) { + bn->hsorted = 1; + bn->hrevsorted = 1; + bn->hkey = 1; + bn->tsorted = 1; + bn->trevsorted = 1; + bn->tkey = 1; + } if (writable != TRUE) bn->batRestricted = BAT_READ; return bn; diff --git a/gdk/gdk_batop.c b/gdk/gdk_batop.c --- a/gdk/gdk_batop.c +++ b/gdk/gdk_batop.c @@ -892,12 +892,21 @@ BATslice(BAT *b, BUN l, BUN h) BATseqbase(BATmirror(bn), *(oid *) BUNtloc(bni, BUNfirst(bn))); } } - bn->hsorted = BAThordered(b); - bn->tsorted = BATtordered(b); - bn->hrevsorted = BAThrevordered(b); - bn->trevsorted = BATtrevordered(b); - BATkey(bn, BAThkey(b)); - BATkey(BATmirror(bn), BATtkey(b)); + if (bn->batCount <= 1) { + bn->hsorted = 1; + bn->tsorted = 1; + bn->hrevsorted = 1; + bn->trevsorted = 1; + BATkey(bn, 1); + BATkey(BATmirror(bn), 1); + } else { + bn->hsorted = BAThordered(b); + bn->tsorted = BATtordered(b); + bn->hrevsorted = BAThrevordered(b); + bn->trevsorted = BATtrevordered(b); + BATkey(bn, BAThkey(b)); + BATkey(BATmirror(bn), BATtkey(b)); + } bn->H->nonil = b->H->nonil || bn->batCount == 0; bn->T->nonil = b->T->nonil || bn->batCount == 0; bn->H->nil = bn->T->nil = 0; /* we just don't know */ _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list