Sounds great, thanks explaining!
Cheers, Roberto

On 28 April 2017 at 10:06, Lefteris <lsidir@gmail.com> wrote:
I am trying to get rid of all the views that are defined over a bat.
Basically, we will not have parentid anymore, thus no bats that point
to a slice of a heap of another bat. This last one will only be
possible with a dense candidate list over the parent (and hence the
only) bat. Almost all gdk functions support candidate lists, so this
will be easy to achieve.

The benefit for this is cleaner code, since we will not have to check
if a bat is a view, and do the sometimes weird positional math. But
most importantly, indexes that are defined on the parent bat (which is
usually also a persistent one)  will be easier to use. Up until now,
in order to use an index on a view, the index should be "slice-able"
too. Now, we only need to augment the index access with candidate
lists. The goal is to lead to more often use of the persistent indexes
than what we do up until now (which access is usually killed by the
slicing of mitosis).

It was good that i wrote it down so i also have a record of the goal:)

cheers,

lefteris

On Thu, Apr 27, 2017 at 6:25 PM, Roberto Cornacchia
<roberto.cornacchia@gmail.com> wrote:
> 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
>
>
> _______________________________________________
> developers-list mailing list
> developers-list@monetdb.org
> https://www.monetdb.org/mailman/listinfo/developers-list
>
_______________________________________________
developers-list mailing list
developers-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/developers-list