No idea what viewless branch is aiming at, but my 5 1/2th sense tells me there is something interesting here.. ;)

On 27 Apr 2017 5:56 pm, "lsidir" <commits+lsidir=gmail.com@monetdb.org> wrote:
Changeset: 63c8d8dbed74 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=63c8d8dbed74
Modified Files:
        gdk/gdk_firstn.c
Branch: viewless
Log Message:

remove BATslice of candidate lists from gdk_firstn


diffs (45 lines):

diff --git a/gdk/gdk_firstn.c b/gdk/gdk_firstn.c
--- a/gdk/gdk_firstn.c
+++ b/gdk/gdk_firstn.c
@@ -140,7 +140,7 @@ BATfirstn_unique(BAT *b, BAT *s, BUN n,
                if (n >= (BUN) (candend - cand)) {
                        /* trivial: return the candidate list (the
                         * part that refers to b, that is) */
-                       return BATslice(s,
+                       return CANDslice(s,
                                        (BUN) (cand - (const oid *) Tloc(s, 0)),
                                        (BUN) (candend - (const oid *) Tloc(s, 0)));
                }
@@ -163,12 +163,12 @@ BATfirstn_unique(BAT *b, BAT *s, BUN n,
                                /* return copy of first relevant part
                                 * of candidate list */
                                i = (BUN) (cand - (const oid *) Tloc(s, 0));
-                               return BATslice(s, i, i + n);
+                               return CANDslice(s, i, i + n);
                        }
                        /* return copy of last relevant part of
                         * candidate list */
                        i = (BUN) (candend - (const oid *) Tloc(s, 0));
-                       return BATslice(s, i - n, i);
+                       return CANDslice(s, i - n, i);
                }
                bn = COLnew(0, TYPE_void, n, TRANSIENT);
                if (bn == NULL)
@@ -374,7 +374,7 @@ BATfirstn_unique_with_groups(BAT *b, BAT
        if (BATtdense(g)) {
                /* trivial: g determines ordering, return initial
                 * slice of s */
-               return BATslice(s, 0, n);
+               return CANDslice(s, 0, n);
        }

        CANDINIT(b, s, start, end, cnt, cand, candend);
@@ -916,7 +916,7 @@ BATfirstn_grouped_with_groups(BAT **topn
        if (BATtdense(g)) {
                /* trivial: g determines ordering, return initial
                 * slice of s */
-               bn = BATslice(s, 0, n);
+               bn = CANDslice(s, 0, n);
                gn = gids ? BATslice(g, 0, n) : NULL;
                if (bn == NULL || (gids != NULL && gn == NULL)) {
                        BBPreclaim(bn);
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list