[Tarantool-patches] [PATCH 4/4] box: introduce indices by UUID
Vladislav Shpilevoy
v.shpilevoy at tarantool.org
Fri Apr 10 19:56:41 MSK 2020
>>> +}
>>> +
>>> +static inline int
>>> +mp_compare_uuid(const char *field_a, const char *field_b)
>>> +{
>>> + return mp_compare_uuid_with_type(field_a, mp_typeof(*field_a),
>>> + field_b, mp_typeof(*field_b));
>>> +}
>>> @@ -1578,6 +1642,21 @@ hint_decimal(decimal_t *dec)
>>> return hint_create(MP_CLASS_NUMBER, val);
>>> }
>>>
>>> +static inline hint_t
>>> +hint_uuid(struct tt_uuid *uuid)
>>> +{
>>> + /* Simply take the first part of the UUID as hint. */
>>
>> 5. Why only first?
>
> I meant, take the ‘high’ part of the UUID. The one which’s compared first.
The current hint is good. I forgot hints should be ordered.
More information about the Tarantool-patches
mailing list