From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 3F0A96FC86; Sun, 25 Apr 2021 12:07:28 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 3F0A96FC86 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1619341648; bh=fmXUhehMopZjpQ7Z7F/GZdEVkVVvofwII56kRnHr99k=; h=To:Cc:References:Date:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=rV/G5JgQL91y8C9DNCfXFiiHupgx5mjP8aJ6MrGIP2jBcSgdSNnILK1oXB0lqwViY 9GHRBh8aaQfDNB+LMXomIJNnGpnqLhs993uldxuJbGfd8c00uNj9hIlEl+890sZn92 eH8ayzVHiPv5gyPc4MFglTDv+PY6vKs9v3ehQ/K8= Received: from smtp53.i.mail.ru (smtp53.i.mail.ru [94.100.177.113]) (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 410596FC86 for ; Sun, 25 Apr 2021 12:07:26 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 410596FC86 Received: by smtp53.i.mail.ru with esmtpa (envelope-from ) id 1laajd-0007Bm-Hb; Sun, 25 Apr 2021 12:07:25 +0300 To: imeevma@tarantool.org Cc: tarantool-patches@dev.tarantool.org References: Message-ID: <4d65f57c-2477-c95a-f199-0af890ae148a@tarantool.org> Date: Sun, 25 Apr 2021 12:07:25 +0300 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-GB X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9203E2ABA940B75486323DEBBB34FA34625FD3482BBBCEE36182A05F5380850402F4B7967C5FF57EDE71593298B812A6371820C889FCBB8A558FEFC5794B1A31C X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7E64685AF2BAE6CDFEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F790063750DEB490C003C9A78638F802B75D45FF914D58D5BE9E6BC1A93B80C6DEB9DEE97C6FB206A91F05B2B1A832CC6AC8FC51CA62E4EE1AA94A25A2BB4B7391E66DBBD2E47CDBA5A96583C09775C1D3CA48CFE478A468B35FE767117882F4460429724CE54428C33FAD30A8DF7F3B2552694AC26CFBAC0749D213D2E47CDBA5A9658378DA827A17800CE71AE4D56B06699BBC9FA2833FD35BB23DF004C90652538430302FCEF25BFAB3454AD6D5ED66289B5278DA827A17800CE7E3127721F5A72C977B076A6E789B0E97A8DF7F3B2552694A1E7802607F20496D49FD398EE364050F26055571C92BF10F49AF716F719AB83EB3661434B16C20AC78D18283394535A9E827F84554CEF5019E625A9149C048EE9ECD01F8117BC8BEE2021AF6380DFAD18AA50765F790063735872C767BF85DA227C277FBC8AE2E8BD9166E38712C78CA75ECD9A6C639B01B4E70A05D1297E1BBCB5012B2E24CD356 X-C1DE0DAB: 0D63561A33F958A5E64BE9A59507BC7FAD61267D630E4C5342EE27E37E39A195D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA7502E6951B79FF9A3F410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34351729636A02D1DE126278F25B3FCA7DF792835F745BBBFEEA62AB8883BAAD961BD7E8038B7989731D7E09C32AA3244CD2C358DE5454F8B29F9F63DB6C104D745A1673A01BA68E40729B2BEF169E0186 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2bioj08M52wfuxcEaQFj0PzQgIw== X-Mailru-Sender: 583F1D7ACE8F49BDD2846D59FC20E9F8D8EC231191DC3E123764E871B65A4A300BB9011FF1C0DF5A424AE0EB1F3D1D21E2978F233C3FAE6EE63DB1732555E4A8EE80603BA4A5B0BC112434F685709FCF0DA7A0AF5A3A8387 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH 1/1] box: make UUID part of SCALAR X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Serge Petrenko via Tarantool-patches Reply-To: Serge Petrenko Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" 23.04.2021 14:40, imeevma@tarantool.org пишет: > Prior to this patch, UUID was not part of SCALAR. However, this should > be changed to comply with the RFC "Consistent Lua/SQL types". > > Closes #6042 > > @TarantoolBot document > Title: UUID is now part of SCALAR > > The UUID field type is now part of the SCALAR field type. This means > that now values of type UUID can be inserted into the SCALAR field, and > these values can participate in the sorting of the SCALAR fields. The > order is as follows: boolean < number < string < varbinary < uuid. > --- Thanks for the patch! Generally LGTM with 2 comments. > https://github.com/tarantool/tarantool/issues/6042 > https://github.com/tarantool/tarantool/tree/imeevma/gh-6042-make-uuid-part-of-scalar > > .../unreleased/make-uuid-part-of-scalar.md | 3 ++ > src/box/field_def.c | 2 +- > src/box/tuple_compare.cc | 2 + > test/app/uuid.result | 46 +++++++++++++++++++ > test/app/uuid.test.lua | 18 ++++++++ > test/engine/ddl.result | 4 +- > test/engine/ddl.test.lua | 2 +- > 7 files changed, 72 insertions(+), 5 deletions(-) > create mode 100644 changelogs/unreleased/make-uuid-part-of-scalar.md > ... > diff --git a/test/app/uuid.test.lua b/test/app/uuid.test.lua > index 867bbd832..7c0942fd6 100644 > --- a/test/app/uuid.test.lua > +++ b/test/app/uuid.test.lua > @@ -164,6 +164,24 @@ u1 = nil > u1_str = nil > u2_str = nil > > +-- > +-- gh-6042: add UUID to SCALAR. > +-- > +s = box.schema.space.create('s', {format={{'s', 'scalar'}}}) > +_ = s:create_index('i') > +s:insert({1}) > +s:insert({'1'}) > +s:insert({uuid.fromstr('11111111-1111-1111-1111-111111111111')}) > +s:insert({uuid.fromstr('11111111-1111-2222-1111-111111111111')}) > + > +-- > +-- Make sure that comparison in right. Comparison in SCALAR field: > +-- bool < number < string < varbinary < uuid. > +-- I'd also insert a varbinary value to the index, just to check. Is it possible from lua? > +s:select() > +s:select({}, {iterator='LE'}) > +s:drop() > + > uuid = nil > > test_run:cmd("clear filter") > diff --git a/test/engine/ddl.result b/test/engine/ddl.result > index 08ad1a57b..e044bc094 100644 > --- a/test/engine/ddl.result > +++ b/test/engine/ddl.result > @@ -1429,10 +1429,8 @@ fail_format_change(12, 'number') > number, got extension' > ... > -- uuid --X--> scalar The comment should be "-- uuid -----> scalar" now. > -fail_format_change(12, 'scalar') > +ok_format_change(12, 'scalar') > --- > -- 'Tuple field 12 (field12) type does not match one required by operation: expected > - scalar, got extension' > ... > -- uuid --X--> string > fail_format_change(12, 'string') > diff --git a/test/engine/ddl.test.lua b/test/engine/ddl.test.lua > index 5ba80e075..0cf25aa46 100644 > --- a/test/engine/ddl.test.lua > +++ b/test/engine/ddl.test.lua > @@ -523,7 +523,7 @@ ok_format_change(12, 'any') > -- uuid --X--> number > fail_format_change(12, 'number') > -- uuid --X--> scalar > -fail_format_change(12, 'scalar') > +ok_format_change(12, 'scalar') > -- uuid --X--> string > fail_format_change(12, 'string') > -- uuid --X--> integer -- Serge Petrenko