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 0F74E6ECE3; Wed, 3 Nov 2021 17:33:57 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 0F74E6ECE3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1635950037; bh=j/QIiDj3hOd7ebbtRwEBH5M8s5G+ZKQFCVJwgNoQzUw=; 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=Y0ySduFIclB3Vwh5WPzWxFJpLPslv9XFRGrRIQvIxDIQgMftWI3vF1JBJtqJoxAHS w/h0hPqR6gzpxVUe4lx2ZMNXurEQTGhhBWKFQF1v8HNSQ9R/8OWXgbRpPvh6jjSk8h kIh8E/yBQe55Zekk4Z4zK9hZMMY9B0cb3Am5wcJU= Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com [209.85.167.53]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 60C246ECE3 for ; Wed, 3 Nov 2021 17:33:55 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 60C246ECE3 Received: by mail-lf1-f53.google.com with SMTP id x27so5589513lfu.5 for ; Wed, 03 Nov 2021 07:33:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to; bh=GjEyzNCsl1g5wq0woK5PfZs23dOHKCbsrnczdqR9nKk=; b=tePROCc/XatB977F6T9IMqdQiRxj+Agu2WPOL6tPatS+ZgxGkYUUUa9wM768EmLONr o6VxjN1/aRVYqk+BmPZt5GP71ATBi4J23HJ+d0+bsKhHof/hFpISoM76uuTIFNDw6oTy YlgcDXXeZWTZebonWUXihe+4jps0xJbqM6uS/Ro9pK24cz+eJ+Ty462VYjbfpnhja9dT gvqBTiJp5nQKmPbw4yd8gt5j2x91IsTF6HKGiBVAU6FvuaMO8cHYqhbGxMlzEJMaraTd ZpcChnm8cfLd9wTzqsb1ECq/frNrMCpqPoyDAMUhlOUh1OlI1GgXJeRQ+RyECZ40pOhh tygw== X-Gm-Message-State: AOAM533vUwkWbuGJD44j9YQCGAP5pW+VFj0J/HHUJMfA+DLa+taXf8NM +uOaXACQnhD3mKzGN6jVXL4UvweRsA== X-Google-Smtp-Source: ABdhPJzmyxPPbSBqH3M0QnYJKGlk6hCNj5vh2InaaSvVlq9a3pZO5SZ7/yntk63abBRhPLaG0g0E/w== X-Received: by 2002:a05:6512:12c4:: with SMTP id p4mr41647811lfg.414.1635950034490; Wed, 03 Nov 2021 07:33:54 -0700 (PDT) Received: from sterling.local ([46.188.68.12]) by smtp.gmail.com with ESMTPSA id o12sm194441lfo.183.2021.11.03.07.33.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Nov 2021 07:33:53 -0700 (PDT) Received: by sterling.local (Postfix, from userid 1000) id 31775E63C90; Wed, 3 Nov 2021 17:33:53 +0300 (MSK) Date: Wed, 3 Nov 2021 17:33:53 +0300 To: Mergen Imeev Cc: v.shpilevoy@tarantool.org, tarantool-patches@dev.tarantool.org Message-ID: <20211103143353.GA394466@starling> Mail-Followup-To: Konstantin Osipov , Mergen Imeev , v.shpilevoy@tarantool.org, tarantool-patches@dev.tarantool.org References: <8a954f84706769e4d685cedac987c2de8eb947cc.1635927295.git.imeevma@gmail.com> <20211103135327.GB396206@starling> <20211103142742.GA177463@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211103142742.GA177463@tarantool.org> 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: Konstantin Osipov via Tarantool-patches Reply-To: Konstantin Osipov Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" * Mergen Imeev [21/11/03 17:32]: > > > > 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? No, I misread your test, thanks for clarification. > > > > + SELECT a1(1) == CAST(1 AS SCALAR); -- Konstantin Osipov, Moscow, Russia