[Tarantool-patches] [PATCH v3] key_def: support composite types extraction
Aleksandr Lyapunov
alyapunov at tarantool.org
Fri Oct 9 12:19:44 MSK 2020
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;
>> +}
>> +
More information about the Tarantool-patches
mailing list