From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpng2.m.smailru.net (smtpng2.m.smailru.net [94.100.179.3]) (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 1FD10430409 for ; Sat, 22 Aug 2020 17:24:14 +0300 (MSK) References: <804a579f9ba60138c0bf579da4c6a3c253d2c272.1597417321.git.imeevma@gmail.com> From: Vladislav Shpilevoy Message-ID: Date: Sat, 22 Aug 2020 16:24:12 +0200 MIME-Version: 1.0 In-Reply-To: <804a579f9ba60138c0bf579da4c6a3c253d2c272.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 02/10] sql: fix functions return types 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 Thanks for the patch! On 14.08.2020 17:04, imeevma@tarantool.org wrote: > This patch fixes incorrect return types in SQL built-in function definitions. Why are they incorrect? You need to provide more descriptive message. It took for me some time to scan the sqlite doc to find what do these functions do and why do you change their types. > --- > src/box/sql/func.c | 10 +++++----- > test/sql/types.result | 4 ++-- > 2 files changed, 7 insertions(+), 7 deletions(-) > > diff --git a/src/box/sql/func.c b/src/box/sql/func.c > index 487cdafe1..affb285aa 100644 > --- a/src/box/sql/func.c > +++ b/src/box/sql/func.c "UNLIKELY" still returns boolean. But according to the doc, it should return the single argument unchanged. So also should be SCALAR. Please, check the other functions too. Also you need to add tests on the changed types. For example, you changed likely() return type, but I don't see any tests failing. So looks like it is not covered.