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 05C786EC40; Thu, 12 Aug 2021 21:51:13 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 05C786EC40 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1628794273; bh=Sbw+2eSTJbkHW48Ueq8z8SewN2D7ARTbQC1jIGOKUH4=; 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=RhC33YC8Z8JM+4s925E6EiNPWfog73eyVJLsbKBiqeA7XZvJ4lBJHco+0xycMoqRL RLA/HCYWOGlBAQNvSsfgyB49J7HR6q7w6LCqHGqizcie0gjE2gbMBe6iG4bKfdWe44 cex4EHMRYmEfLbkjEbPiMeShR6dM4p/YhVB26UKw= Received: from smtp16.mail.ru (smtp16.mail.ru [94.100.176.153]) (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 DFE0B6EC40 for ; Thu, 12 Aug 2021 21:51:05 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org DFE0B6EC40 Received: by smtp16.mail.ru with esmtpa (envelope-from ) id 1mEFnF-0003MS-1B; Thu, 12 Aug 2021 21:51:05 +0300 To: imeevma@tarantool.org Cc: tarantool-patches@dev.tarantool.org References: <2831e4d4b237ead1e70129010ddd10f9429afe72.1628697448.git.imeevma@gmail.com> Message-ID: Date: Thu, 12 Aug 2021 21:51:01 +0300 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: <2831e4d4b237ead1e70129010ddd10f9429afe72.1628697448.git.imeevma@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD92087353F0EC44DD9F9A2272A1D086A28553D1D5C4B4124EF182A05F538085040815160B53716BEDC6BDAB4467934F34C1C24E04011F206459CBEB97C45B7FA22 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE73B44982FA5E78411EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F790063770519A3AF4A224F58638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D881C4ECB91C75A3B247499B190384C1F4117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC292D688DDAD4E7BC389733CBF5DBD5E9C8A9BA7A39EFB766F5D81C698A659EA7CC7F00164DA146DA9985D098DBDEAEC8744B801E316CB65FF6B57BC7E6449061A352F6E88A58FB86F5D81C698A659EA73AA81AA40904B5D9A18204E546F3947C51C368AE3DEE0FB9040F9FF01DFDA4A84AD6D5ED66289B52698AB9A7B718F8C46E0066C2D8992A16725E5C173C3A84C3F19813974D542B42BA3038C0950A5D36B5C8C57E37DE458B0BC6067A898B09E46D1867E19FE14079C09775C1D3CA48CF3D321E7403792E342EB15956EA79C166A417C69337E82CC275ECD9A6C639B01B78DA827A17800CE74ABCC139FF3F849B731C566533BA786AA5CC5B56E945C8DA X-B7AD71C0: AC4F5C86D027EB782CDD5689AFBDA7A213B5FB47DCBC3458834459D11680B5050CBC14D6D42E3AAF53E40225FD42D21D X-C1DE0DAB: 0D63561A33F958A50A6FA957A1440FA048F79F6BB69AF2E90297D9F7C17A081DD59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA752DA3D96DA0CEF5C48E8E86DC7131B365E7726E8460B7C23C X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D3450C5E6D685282BA1BAD18D547525B8A44273D080C43773B9EB0B5F6F3F8E7DF65C6DDB91A96EDDA61D7E09C32AA3244CFB786BC5DCAA39BA5186E3A513157739795D98D676DD64D0729B2BEF169E0186 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojKW4rnL99YhL9m6cZm3YOoA== X-Mailru-Sender: DCB18673505F245B5D9D3B35E842BD3C680B6F6725E4D02C5111A6CED9465BC97B550B4BA35CC43C841FB911095AA09146E8006E22572C39C920B61C43410E8717BDA556287159EE9437F6177E88F7363CDA0F3B3F5B9367 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v1 2/7] sql: re-introduce NUMBER and SCALAR meta-types 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: Vladislav Shpilevoy via Tarantool-patches Reply-To: Vladislav Shpilevoy Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Thanks for the patch! > diff --git a/src/box/sql/func.c b/src/box/sql/func.c > index 5ac5c5e56..ebb546a7f 100644 > --- a/src/box/sql/func.c > +++ b/src/box/sql/func.c > @@ -162,6 +162,12 @@ typeofFunc(sql_context * context, int NotUsed, sql_value ** argv) > { > const char *z = 0; > UNUSED_PARAMETER(NotUsed); > + if (argv[0]->type == MEM_TYPE_NULL) > + return mem_set_str0_static(context->pOut, "NULL"); 1. This can be a part of the switch-case a few lines below. > + if ((argv[0]->flags & MEM_Number) != 0) > + return mem_set_str0_static(context->pOut, "number"); > + if ((argv[0]->flags & MEM_Scalar) != 0) > + return mem_set_str0_static(context->pOut, "scalar"); 2. Could you please remind me what was wrong with having type MEM_TYPE_SCALAR and storing the actual type in another field? > switch (argv[0]->type) { > case MEM_TYPE_INT: > case MEM_TYPE_UINT: