[Tarantool-patches] [PATCH v3 14/16] module api: expose box_key_def_extract_key()
Alexander Turenko
alexander.turenko at tarantool.org
Thu Oct 15 05:39:20 MSK 2020
On Thu, Oct 15, 2020 at 01:41:51AM +0200, Vladislav Shpilevoy wrote:
> Thanks for the patch!
>
> > diff --git a/src/box/key_def.c b/src/box/key_def.c
> > index 7226f2482..da1c23135 100644
> > --- a/src/box/key_def.c
> > +++ b/src/box/key_def.c
> > @@ -620,6 +620,13 @@ box_key_def_merge(const box_key_def_t *first, const box_key_def_t *second)
> > return key_def_merge(first, second);
> > }
> >
> > +char *
> > +box_key_def_extract_key(box_key_def_t *key_def, box_tuple_t *tuple,
> > + int multikey_idx, uint32_t *key_size_ptr)
>
> I would try to make the tuple const here. Key_def can't be const (because
> multikey updates some values in it even in simple getters), but the tuple
> can. Although it requires const addition to several internal functions.
A fear to do so after Vladimir's commit
077671fe04b5fec898cccecd4aac12ee4281ce0b ('Drop const qualifier of
struct tuple').
In theory: what if we'll have some offset map that will be calculated
lazily for some kind of tuples?
More information about the Tarantool-patches
mailing list