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

Add the seqbase to the generated oids to that the result actually refers to the 
input.


diffs (57 lines):

diff --git a/gdk/gdk_firstn.c b/gdk/gdk_firstn.c
--- a/gdk/gdk_firstn.c
+++ b/gdk/gdk_firstn.c
@@ -437,7 +437,7 @@ BATfirstn_unique_with_groups(BAT *b, BAT
                        for (j = 0; j < top; j++) {                     \
                                if (v[i] == v[groups[j].bun]) {         \
                                        if (bp)                         \
-                                               *bp++ = i;              \
+                                               *bp++ = i + b->hseqbase; \
                                        *gp++ = j;                      \
                                        break;                          \
                                }                                       \
@@ -596,7 +596,7 @@ BATfirstn_grouped(BAT **topn, BAT **gids
                        for (j = 0; j < top; j++) {
                                if (i == groups[j].bun) {
                                        if (bp)
-                                               *bp++ = i;
+                                               *bp++ = i + b->hseqbase;
                                        *gp++ = j;
                                        break;
                                }
@@ -628,7 +628,7 @@ BATfirstn_grouped(BAT **topn, BAT **gids
                        for (j = 0; j < top; j++) {
                                if (cmp(BUNtail(bi, i + BUNfirst(b)), 
BUNtail(bi, groups[j].bun)) == 0) {
                                        if (bp)
-                                               *bp++ = i;
+                                               *bp++ = i + b->hseqbase;
                                        *gp++ = j;
                                        break;
                                }
@@ -717,7 +717,7 @@ BATfirstn_grouped(BAT **topn, BAT **gids
                                if (gv[ci] == groups[j].grp &&          \
                                    v[i] == v[groups[j].bun]) {         \
                                        if (bp)                         \
-                                               *bp++ = i;              \
+                                               *bp++ = i + b->hseqbase; \
                                        *gp++ = j;                      \
                                        break;                          \
                                }                                       \
@@ -895,7 +895,7 @@ BATfirstn_grouped_with_groups(BAT **topn
                                if (gv[ci] == groups[j].grp &&
                                    i == groups[j].bun) {
                                        if (bp)
-                                               *bp++ = i;
+                                               *bp++ = i + b->hseqbase;
                                        *gp++ = j;
                                        break;
                                }
@@ -928,7 +928,7 @@ BATfirstn_grouped_with_groups(BAT **topn
                                if (gv[ci] == groups[j].grp &&
                                    cmp(BUNtail(bi, i + BUNfirst(b)), 
BUNtail(bi, groups[j].bun)) == 0) {
                                        if (bp)
-                                               *bp++ = i;
+                                               *bp++ = i + b->hseqbase;
                                        *gp++ = j;
                                        break;
                                }
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to