From: Kirill Shcherbatov <kshcherbatov@tarantool.org>
To: tarantool-patches@freelists.org,
Vladimir Davydov <vdavydov.dev@gmail.com>
Cc: kostja@tarantool.org
Subject: Re: [tarantool-patches] Re: [PATCH v5 3/3] box: introduce func_index
Date: Fri, 26 Jul 2019 16:58:25 +0300 [thread overview]
Message-ID: <ca245c6c-cc0f-1d16-0e65-69c6ca274f4d@tarantool.org> (raw)
In-Reply-To: <20190726121536.GA4659@esperanza>
>> +static inline void
>> +index_def_set_func(struct index_def *def, struct func *func)
>> +{
>> + assert(def->opts.func_id > 0 &&
>> + def->key_def->for_func_index && def->key_def->for_func_index);
>
> for_func_index && for_func_index
Fixed.
>
>> + /*
>> + * Set func_index_func for functional index key
>> + * definition. It is used in key_list module to extract
>> + * a key for given tuple.
>> + */
>> + def->key_def->func_index_func = func;
>> + def->cmp_def->func_index_func = NULL;
>
> Hmm, why is cmp_def->func_index_func set to NULL?
Because we never use func pointer in cmp_def. Kostya supposed do not initialize a pointer
when it is not reasonable.
>> + _index:insert{_func_index.id, 0, 'primary', 'tree', {unique = true},
>> + {{0, 'unsigned'}, {1, 'unsigned'}, {2, 'unsigned'}}}
>
> Why do we need to make all the three fields parts of the primary index?
> Shouldn't space and index id be enough?
Okey, fixed.
> Other than that, the patch is fine by me.
next prev parent reply other threads:[~2019-07-26 13:58 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-26 9:43 [PATCH v5 0/3] box: functional indexes Kirill Shcherbatov
2019-07-26 9:43 ` [PATCH v5 1/3] box: introduce opts.is_multikey function option Kirill Shcherbatov
2019-07-26 9:43 ` [PATCH v5 2/3] box: introduce tuple_chunk infrastructure Kirill Shcherbatov
2019-07-26 9:43 ` [PATCH v5 3/3] box: introduce func_index Kirill Shcherbatov
2019-07-26 12:15 ` Vladimir Davydov
2019-07-26 13:58 ` Kirill Shcherbatov [this message]
2019-07-26 17:42 ` [tarantool-patches] [PATCH v5 0/3] box: functional indexes Kirill Yukhin
2019-07-26 19:00 ` [tarantool-patches] " Vladislav Shpilevoy
-- strict thread matches above, loose matches on Subject: below --
2019-07-25 18:39 Kirill Shcherbatov
2019-07-25 18:39 ` [PATCH v5 3/3] box: introduce func_index Kirill Shcherbatov
2019-07-26 9:49 ` Vladimir Davydov
2019-07-26 9:57 ` Konstantin Osipov
2019-07-26 10:10 ` Vladimir Davydov
2019-07-26 19:31 ` [tarantool-patches] " Konstantin Osipov
2019-07-27 11:42 ` Vladimir Davydov
2019-07-28 21:30 ` Konstantin Osipov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ca245c6c-cc0f-1d16-0e65-69c6ca274f4d@tarantool.org \
--to=kshcherbatov@tarantool.org \
--cc=kostja@tarantool.org \
--cc=tarantool-patches@freelists.org \
--cc=vdavydov.dev@gmail.com \
--subject='Re: [tarantool-patches] Re: [PATCH v5 3/3] box: introduce func_index' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox