From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp54.i.mail.ru (smtp54.i.mail.ru [217.69.128.34]) (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 F3A48469719 for ; Fri, 9 Oct 2020 12:19:45 +0300 (MSK) From: Aleksandr Lyapunov References: <20201001183509.15603-1-i.kosarev@tarantool.org> Message-ID: <7f96f2c1-e345-66b0-0b7f-1a06429ad036@tarantool.org> Date: Fri, 9 Oct 2020 12:19:44 +0300 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format="flowed" Content-Transfer-Encoding: 8bit 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 Oh, i've just found that FIELD_TYPE_VARBINARY is comparable. Please forget my previous letter. The patch LGTM, thanks. On 10/9/20 12:18 PM, Aleksandr Lyapunov wrote: > 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; >> +} >> +