From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp29.i.mail.ru (smtp29.i.mail.ru [94.100.177.89]) (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 7B780469710 for ; Sat, 21 Nov 2020 18:17:11 +0300 (MSK) References: <696b028492d8c1e680a3386c87534d96eac7c272.1605685304.git.babinoleg@mail.ru> From: Vladislav Shpilevoy Message-ID: <5dc1f19d-a579-bef0-047b-e467e2d60970@tarantool.org> Date: Sat, 21 Nov 2020 16:17:09 +0100 MIME-Version: 1.0 In-Reply-To: <696b028492d8c1e680a3386c87534d96eac7c272.1605685304.git.babinoleg@mail.ru> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Tarantool-patches] [PATCH v2 2/2] uuid: support uuid comparison with strings List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: olegrok@tarantool.org, lvasiliev@tarantool.org Cc: tarantool-patches@dev.tarantool.org Thanks for the patch! See 2 comments below. On 18.11.2020 08:56, olegrok@tarantool.org wrote: > From: Oleg Babin > > Before this patch it was impossible to compare uuid values with > string representations of uuid. However we have cases when such > comparisons is possible (e.g. "decimal" where we can compare > decimal values with strings and numbers). > > This patch extends uuid comparators (eq, lt, le) and every string > argument is tried to be converted to uuid value to compare then. > > Follow-up #5511 > > @TarantoolBot document > Title: uuid values could be compared with strings > > Currently it's possible to compare uuid values with its string > representations: > ```lua > u1_str = 'aaaaaaaa-aaaa-4000-b000-000000000001' > u1 = uuid.fromstr(u1_str) > u2_str = 'bbbbbbbb-bbbb-4000-b000-000000000001' > > u1 == u1_str -- true > u1 == u2_str -- false > > u1 >= u1_str -- true > u1 < u2_str -- true > ``` 1. Better use a single docbot request. It will be simpler for the doc team to handle it, since both the updates are about the same place. But up to you. > --- > Issue: https://github.com/tarantool/tarantool/issues/5511 > Branch: https://github.com/tarantool/tarantool/tree/olegrok/5511-uuid-cmp-v2 > > diff --git a/test/app/uuid.result b/test/app/uuid.result > index e06331001..5b9ffa230 100644 > --- a/test/app/uuid.result > +++ b/test/app/uuid.result 2. I don't see a test for == with an incorrect string. Is it there?