From: Aleksandr Lyapunov <alyapunov@tarantool.org> To: Ilya Kosarev <i.kosarev@tarantool.org> Cc: tarantool-patches@dev.tarantool.org, alexander.turenko@tarantool.org Subject: Re: [Tarantool-patches] [PATCH v3] key_def: support composite types extraction Date: Fri, 9 Oct 2020 12:18:03 +0300 [thread overview] Message-ID: <b786a1c4-2730-0ad1-668c-a0455a8509c7@tarantool.org> (raw) In-Reply-To: <20201001183509.15603-1-i.kosarev@tarantool.org> Hi! thanks for the patch. See 1 comment below. If you add suggested line of code the patch will lgtm. On 10/1/20 9:35 PM, Ilya Kosarev wrote: > +/** > + * Return the first field type which can't be compared if @a key_def > + * has such. Otherwise return field_type_MAX value. > + */ > +static inline enum field_type > +key_def_incomparable_type(const struct key_def *key_def) > +{ > + for (uint32_t i = 0; i < key_def->part_count; ++i) { > + if (key_def->parts[i].type == FIELD_TYPE_ANY || What about FIELD_TYPE_VARBINARY? we cannot compare it either. I think there must be added key_def->parts[i].type == FIELD_TYPE_VARBINARY || > + key_def->parts[i].type == FIELD_TYPE_ARRAY || > + key_def->parts[i].type == FIELD_TYPE_MAP) { > + /* Tuple comparators don't support these types. */ > + return key_def->parts[i].type; > + } > + } > + return field_type_MAX; > +} > +
next prev parent reply other threads:[~2020-10-09 9:18 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-10-01 18:35 Ilya Kosarev 2020-10-09 9:18 ` Aleksandr Lyapunov [this message] 2020-10-09 9:19 ` Aleksandr Lyapunov
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=b786a1c4-2730-0ad1-668c-a0455a8509c7@tarantool.org \ --to=alyapunov@tarantool.org \ --cc=alexander.turenko@tarantool.org \ --cc=i.kosarev@tarantool.org \ --cc=tarantool-patches@dev.tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH v3] key_def: support composite types extraction' \ /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