Changeset: c4e0e31888f9 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c4e0e31888f9
Modified Files:
        gdk/gdk_firstn.c
Branch: Oct2014
Log Message:

Fix for bug 3560: last value in grouped first-N isn't necessarily highest.


diffs (16 lines):

diff --git a/gdk/gdk_firstn.c b/gdk/gdk_firstn.c
--- a/gdk/gdk_firstn.c
+++ b/gdk/gdk_firstn.c
@@ -677,12 +677,9 @@ BATfirstn_grouped(BAT **topn, BAT **gids
 #define shuffle_grouped_with_groups2(TYPE)                             \
        do {                                                            \
                const TYPE *v = (const TYPE *) Tloc(b, BUNfirst(b));    \
-               TYPE lastval = v[groups[top - 1].bun];                  \
                for (ci = 0, i = cand ? *cand++ - b->hseqbase : start;  \
                     i < end;                                           \
                     ci++, cand < candend ? (i = *cand++ - b->hseqbase) : i++) 
{ \
-                       if (asc ? v[i] > lastval : v[i] < lastval)      \
-                               continue;                               \
                        for (j = 0; j < top; j++) {                     \
                                if (gv[ci] == groups[j].grp &&          \
                                    v[i] == v[groups[j].bun]) {         \
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to