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 D0A0D6E454; Thu, 10 Feb 2022 12:14:12 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org D0A0D6E454 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1644484452; bh=vuNG3dRjB6fLBvRkb9CCyxvPm6/x4+XqE1T3so5QlsU=; h=To:Cc:Date:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=TVZZOcyfEIVlbuu4KDMhCPkaLvCUutouFcmdMat7JbLIGzKHdwAAjbIEBmFcVlVVf Wu5nToKnKVPwuryD1A+A0uZbkzlbLlqI6RegU5puu/WekPHeqrYq9apsTXF61FnToO 6xRfqieEaVkwczDgz2nKTDCyd6VoBr0buDy/QoS4= Received: from smtp53.i.mail.ru (smtp53.i.mail.ru [94.100.177.113]) (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 35B346E454 for ; Thu, 10 Feb 2022 12:14:11 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 35B346E454 Received: by smtp53.i.mail.ru with esmtpa (envelope-from ) id 1nI5Wk-0000T0-7f; Thu, 10 Feb 2022 12:14:10 +0300 To: kyukhin@tarantool.org Cc: tarantool-patches@dev.tarantool.org Date: Thu, 10 Feb 2022 12:14:09 +0300 Message-Id: X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-7564579A: EEAE043A70213CC8 X-77F55803: 4F1203BC0FB41BD9B74B50284A7C1A0B2FBEF7BC74785E48B630087FB2D0512E182A05F53808504052D9BEEB542F0CC0EB975600407140BE3EB3F598BDB00008201C1F585742A791 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE707314F92EEE30EB3EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006376AFB9B40001E44068638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8C2DB7F7AB781D1D4C263F0538F9729D5117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCF1175FABE1C0F9B6A471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F44604297287769387670735209ECD01F8117BC8BEA471835C12D1D977C4224003CC836476EB9C4185024447017B076A6E789B0E975F5C1EE8F4F765FCACA221F39DAEBBB63AA81AA40904B5D9CF19DD082D7633A078D18283394535A93AA81AA40904B5D98AA50765F7900637BD120C2DC9C8FF36D81D268191BDAD3D698AB9A7B718F8C4D1B931868CE1C5781A620F70A64A45A98AA50765F79006372E808ACE2090B5E1725E5C173C3A84C3C5EA940A35A165FF2DBA43225CD8A89F83C798A30B85E16B262FEC7FBD7D1F5BB5C8C57E37DE458BEDA766A37F9254B7 X-8FC586DF: 6EFBBC1D9D64D975 X-C1DE0DAB: C20DE7B7AB408E4181F030C43753B8186998911F362727C414F749A5E30D975C05348A8C7D563C426DD962680432719549D201B62A06D9B29C2B6934AE262D3EE7EAB7254005DCED864F6051C41E3F501E0A4E2319210D9B64D260DF9561598F01A9E91200F654B07D06A436E56C8DB493EDB24507CE13387DFF0A840B692CF8 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D3482189E76C6218D8F561181A156CDEEB1275CF4B64FC6873A80BAB8EFCB2CDB053C5E5FB772E062BF1D7E09C32AA3244C9636C56D422645E37540E5CD91016B3D1DD47778AE04E04D729B2BEF169E0186 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojbL9S8ysBdXjHboaMg+6oA5g7IzHAHp2U X-Mailru-Sender: 5C3750E245F362008BC1685FEC6306EDFC0D49A39CC307B9EB975600407140BEC479C2914A57FB1F5105BD0848736F9966FEC6BF5C9C28D97E07721503EA2E00ED97202A5A4E92BF72D6B4FCE48DF648AE208404248635DF X-Mras: Ok Subject: [Tarantool-patches] [PATCH v2 0/4] Introduce custom aggregate functions 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: imeevma@tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" This patch-set introduces user-defined aggregate functions to SQL. Changes in v2: - Patch-set was reworked due to new design. https://github.com/tarantool/tarantool/issues/2579 https://github.com/tarantool/tarantool/tree/imeevma/gh-2579-custom-aggregate-functions Mergen Imeev (4): sql: fix COUNT() optimization conditions sql: drop unnecessary P2 register for OP_AggFinal sql: introduce custom aggregate functions sql: introduce FINALIZE for custom aggregate .../gh-2579-introduce-custom-aggregates.md | 3 + src/box/alter.cc | 13 + src/box/lua/schema.lua | 2 +- src/box/sql/expr.c | 17 +- src/box/sql/func.c | 31 ++- src/box/sql/resolve.c | 12 + src/box/sql/select.c | 42 +++- src/box/sql/sqlInt.h | 6 +- src/box/sql/vdbe.c | 17 +- test/sql-tap/CMakeLists.txt | 2 + test/sql-tap/gh-2579-custom-aggregate.c | 28 +++ .../sql-tap/gh-2579-custom-aggregate.test.lua | 225 ++++++++++++++++++ 12 files changed, 361 insertions(+), 37 deletions(-) create mode 100644 changelogs/unreleased/gh-2579-introduce-custom-aggregates.md create mode 100644 test/sql-tap/gh-2579-custom-aggregate.c create mode 100755 test/sql-tap/gh-2579-custom-aggregate.test.lua -- 2.25.1