Changeset: 8c1bbf289eea for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/8c1bbf289eea Modified Files: gdk/gdk_batop.c Branch: default Log Message:
Don't use radix sort for UUID on little-endian architectures. The UUIDcompare function uses memcmp, and this results in comparing the bytes in the opposite order from how it would happen on little-endian systems when using radix sorte. On big-endian, the order is the same, so there we can (and do) use radix sort. diffs (20 lines): diff --git a/gdk/gdk_batop.c b/gdk/gdk_batop.c --- a/gdk/gdk_batop.c +++ b/gdk/gdk_batop.c @@ -2284,11 +2284,16 @@ do_sort(void *restrict h, void *restrict if (nilslast == reverse && (stable || n > 100)) return GDKrsort(h, t, n, hs, ts, reverse, false); break; +#ifdef WORDS_BIGENDIAN + /* only use radix sort for UUID on big-endian architectures since + * the bytes need to be sorted in the opposite order from + * little-endian */ case TYPE_uuid: assert(base == NULL); if (nilslast == reverse && (stable || n > 100)) return GDKrsort(h, t, n, hs, ts, reverse, true); break; +#endif default: break; } _______________________________________________ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org