From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpng3.m.smailru.net (smtpng3.m.smailru.net [94.100.177.149]) (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 8C6D7430409 for ; Sat, 22 Aug 2020 17:23:37 +0300 (MSK) References: <3a825a5a3d61933f5e76d6594f33ad304dd07559.1597417321.git.imeevma@gmail.com> From: Vladislav Shpilevoy Message-ID: <737d1ce0-0d00-84f8-412d-fb805ebbdbbc@tarantool.org> Date: Sat, 22 Aug 2020 16:23:35 +0200 MIME-Version: 1.0 In-Reply-To: <3a825a5a3d61933f5e76d6594f33ad304dd07559.1597417321.git.imeevma@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Tarantool-patches] [PATCH v2 01/10] sql: do not return UNSIGNED in built-in functions List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: imeevma@tarantool.org, tsafin@tarantool.org Cc: tarantool-patches@dev.tarantool.org Hi! Thanks for the patch! On 14.08.2020 17:04, imeevma@tarantool.org wrote: > This patch forces functions to return INTEGER instead of UNSIGNED. Why? I don't see a reason why length() would need to return int instead of uint. > diff --git a/test/sql/types.result b/test/sql/types.result > index 442245186..95f7713e8 100644 > --- a/test/sql/types.result > +++ b/test/sql/types.result > @@ -2795,3 +2795,15 @@ box.execute([[DROP TABLE ts;]]) > --- > - row_count: 1 > ... > +-- > +-- gh-4159: Make sure that functions returns values of type INTEGER > +-- instead of values of type UNSIGNED. What are the other functions besides length()? > +-- > +box.execute([[SELECT typeof(length('abc'));]])