Changeset: 4dfee7f529c6 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4dfee7f529c6 Modified Files: gdk/ChangeLog gdk/gdk.h gdk/gdk_batop.c monetdb5/modules/kernel/bat5.c monetdb5/modules/mal/mat.c Branch: default Log Message:
BATordered now works on the TAIL column. diffs (78 lines): diff --git a/gdk/ChangeLog b/gdk/ChangeLog --- a/gdk/ChangeLog +++ b/gdk/ChangeLog @@ -1,6 +1,9 @@ # ChangeLog file for MonetDB # This file is updated with Maddlog +* Wed Sep 9 2015 Sjoerd Mullender <[email protected]> +- BATordered now works on the TAIL column. + * Tue Sep 8 2015 Sjoerd Mullender <[email protected]> - Removed obsolete functions BATorder() and BATorder_rev(). diff --git a/gdk/gdk.h b/gdk/gdk.h --- a/gdk/gdk.h +++ b/gdk/gdk.h @@ -1610,8 +1610,8 @@ gdk_export gdk_return BATprintf(stream * * clusterings will allow that MonetDB's main-memory oriented * algorithms work efficiently also in a disk-oriented context. * - * BATordered starts a check on the head values to see if they are - * ordered. The result is returned and stored in the hsorted field of + * BATordered starts a check on the tail values to see if they are + * ordered. The result is returned and stored in the tsorted field of * the BAT. The BATrevert puts all the live BUNs of a BAT in reverse * order. It just reverses the sequence, so this does not necessarily * mean that they are sorted in reverse order! diff --git a/gdk/gdk_batop.c b/gdk/gdk_batop.c --- a/gdk/gdk_batop.c +++ b/gdk/gdk_batop.c @@ -1084,17 +1084,17 @@ BATslice(BAT *b, BUN l, BUN h) int BATordered(BAT *b) { - if (!b->hsorted) - BATderiveHeadProps(b, 0); - return b->hsorted; + if (!b->tsorted) + BATderiveHeadProps(BATmirror(b), 0); + return b->tsorted; } int BATordered_rev(BAT *b) { - if (!b->hrevsorted) - BATderiveHeadProps(b, 0); - return b->hrevsorted; + if (!b->trevsorted) + BATderiveHeadProps(BATmirror(b), 0); + return b->trevsorted; } /* figure out which sort function is to be called diff --git a/monetdb5/modules/kernel/bat5.c b/monetdb5/modules/kernel/bat5.c --- a/monetdb5/modules/kernel/bat5.c +++ b/monetdb5/modules/kernel/bat5.c @@ -892,7 +892,7 @@ BKCisSorted(bit *res, const bat *bid) if ((b = BATdescriptor(*bid)) == NULL) { throw(MAL, "bat.isSorted", RUNTIME_OBJECT_MISSING); } - *res = BATordered(BATmirror(b)); + *res = BATordered(b); BBPunfix(b->batCacheid); return MAL_SUCCEED; } diff --git a/monetdb5/modules/mal/mat.c b/monetdb5/modules/mal/mat.c --- a/monetdb5/modules/mal/mat.c +++ b/monetdb5/modules/mal/mat.c @@ -855,7 +855,7 @@ MATproject(Client cntxt, MalBlkPtr mb, M res = MATproject_(map, bats, len ); if (sorted && res) - BATordered(BATmirror(res)); + BATordered(res); error: if (map) BBPunfix(map->batCacheid); if (bats) { _______________________________________________ checkin-list mailing list [email protected] https://www.monetdb.org/mailman/listinfo/checkin-list
