From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp62.i.mail.ru (smtp62.i.mail.ru [217.69.128.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 1927B469719 for ; Fri, 9 Oct 2020 12:18:05 +0300 (MSK) References: <20201001183509.15603-1-i.kosarev@tarantool.org> From: Aleksandr Lyapunov Message-ID: Date: Fri, 9 Oct 2020 12:18:03 +0300 MIME-Version: 1.0 In-Reply-To: <20201001183509.15603-1-i.kosarev@tarantool.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Subject: Re: [Tarantool-patches] [PATCH v3] key_def: support composite types extraction List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Ilya Kosarev Cc: tarantool-patches@dev.tarantool.org, alexander.turenko@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; > +} > +