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 A51896ECE3; Wed, 3 Nov 2021 17:27:47 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org A51896ECE3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1635949667; bh=YtXR4pcImFKHcraQAxCnXO1CGm6Ftg6JEtIuVomojZQ=; h=Date:To:Cc:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=BIo60aHyKh8Nz6Qh6uxNceoYtODu4rDL+LbEmt6IQhOtTxJyxDb5yL/W8EvRFOuqS Gdeep6nBJOlwW+pZsaWGOXUDcxOyKk7Wmfj6qSKhi34Yu0JiAZxfyb7wJSC71zghYg +BsLjiUdRF+QZ39RJhLmmpQHzOokv1N0fpFKPGYw= Received: from smtpng1.i.mail.ru (smtpng1.i.mail.ru [94.100.181.251]) (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 CCAE16ECE3 for ; Wed, 3 Nov 2021 17:27:44 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org CCAE16ECE3 Received: by smtpng1.m.smailru.net with esmtpa (envelope-from ) id 1miHEu-0008KT-6b; Wed, 03 Nov 2021 17:27:44 +0300 Date: Wed, 3 Nov 2021 17:27:42 +0300 To: Konstantin Osipov Cc: v.shpilevoy@tarantool.org, tarantool-patches@dev.tarantool.org Message-ID: <20211103142742.GA177463@tarantool.org> References: <8a954f84706769e4d685cedac987c2de8eb947cc.1635927295.git.imeevma@gmail.com> <20211103135327.GB396206@starling> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20211103135327.GB396206@starling> X-7564579A: EEAE043A70213CC8 X-77F55803: 4F1203BC0FB41BD9F9D976862A30D4FE71E4F4AD1F019DBD166E326202659E54182A05F5380850403E90F248AD16A5F26FE7E12B86755AFA6B79B77E3DB4988A2A3E1120ADA999A3 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7544B1CCE26E01C74EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006375E347E1311495C1B8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D80D755442FDF681B8E5C725F0AD5E0BB8117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC974A882099E279BDA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F446042972877693876707352033AC447995A7AD18F04B652EEC242312D2E47CDBA5A96583BA9C0B312567BB231DD303D21008E29813377AFFFEAFD269A417C69337E82CC2E827F84554CEF50127C277FBC8AE2E8BA83251EDC214901ED5E8D9A59859A8B6B1CFA6D474D4A6A4089D37D7C0E48F6C5571747095F342E88FB05168BE4CE3AF X-C1DE0DAB: 0D63561A33F958A5AD31B07842DDEA5679B7B1B0D1F3BAF8E720A64E657C9A4BD59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA75C69C5C0DDE134364410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34A9A0A0BF1A2CAC62615DCF2B9AAA38E53DC10D8D6EE348CE2C8F3523CB1FB3CB5B44FAFA2E80D1341D7E09C32AA3244CF0816BA1F8BAE414E8F9FAD0466D2F3B5A1673A01BA68E40FACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2bioj3JiVFN03mSVi46TFlU+LYA== X-Mailru-Sender: 689FA8AB762F7393C37E3C1AEC41BA5DE68AAB1DE6EF079F35B0562B157E740383D72C36FC87018B9F80AB2734326CD2FB559BB5D741EB96352A0ABBE4FDA4210A04DAD6CC59E33667EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v1 1/2] sql: introduce field type ARRAY 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: Mergen Imeev via Tarantool-patches Reply-To: Mergen Imeev Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Hi! Thank you for the advice. My answer below. On Wed, Nov 03, 2021 at 04:53:27PM +0300, Konstantin Osipov wrote: > * Mergen Imeev via Tarantool-patches [21/11/03 11:22]: > > This patch introduces ARRAY to SQL. After this patch, all SQL operations > > and built-in functions should work correctly with ARRAY values. However, > > there is currently no way to create ARRAY values using only SQL tools. > > The entire industry is using [] for array subscript and {} for map > subscript. Why did you have to invent () for it? > Here we have a user-defined function a1() that takes one argument and returns an ARRAY containing a single element that was given as an argument. There are also two more functions: a2(), which takes two arguments, and a3(), which takes three arguments. They work the same way. I created them to test if ARRAY works as intended. The built-in ARRAY() function takes 1 to 127 arguments and returns ARRAY, which contains the values passed as arguments to the function. This patch-set is just a part of the ARRAY addition, and we plan to add [] for ARRAY and {} for MAP a little later, after we have built-in functions ARRAY() and MAP(). Or did you mean something else? > > + SELECT a1(1) == CAST(1 AS SCALAR); > > -- > Konstantin Osipov, Moscow, Russia