[Tarantool-patches] [PATCH] lua: introduce function for uuid comparison

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Wed Nov 18 01:08:25 MSK 2020


Hi! Thanks for the reply!

>> tarantool> u1 = 'b0b681e9-dd43-4341-98b4-a973b23f1421'
>> ---
>> ...
>>
>> tarantool> u2 = uuid()
>> ---
>> ...
>>
>> tarantool> type(u2)
>> ---
>> - cdata
>> ...
>>
>> tarantool> type(u1)
>> ---
>> - string
>> ...
>>
>> tarantool> u2 < u1
>> ---
>> - true
>> ...
>>
>> tarantool> u1 > u2
>> ---
>> - true
>> ...
>>
>> Doesn't this look wrong?
> 
> Yes and no. At first result is the same.

Oh, shit. I am so stupid. Sorry, Oleg and Igor, my bad.

My comment about comparison being wrong is not fair, obviously.

But still propose to use static_alloc. I do not insist. Only if perf
matters. (For me it matters always, so I would try.)


More information about the Tarantool-patches mailing list