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 645306EC55; Fri, 10 Sep 2021 19:01:51 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 645306EC55 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1631289711; bh=CXDGLtsuQjVnMKFJ+E6ZiYNNPZHwTKFL0glnhZRIAHg=; h=To:Cc:Date:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=sMhs2IcLPqq+2CuC2/v2cHsXmB4M/lsdRxpP1gz/gwXTJHIK55XlldMJASq9xbZ0f WAq0tIBmaIKQOLXidXZwcnRZ9WkhEERJ3XWFxf9zy545SjN21NIomFIphpN4npoc8E b0Y5ICTxSRdHbjaHDPELNl3DH3cWaG/bRo9ManD0= 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 5B9556EC55 for ; Fri, 10 Sep 2021 19:01:50 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 5B9556EC55 Received: by smtpng1.m.smailru.net with esmtpa (envelope-from ) id 1mOiyL-00069r-H9; Fri, 10 Sep 2021 19:01:49 +0300 To: v.shpilevoy@tarantool.org Cc: tarantool-patches@dev.tarantool.org Date: Fri, 10 Sep 2021 19:01:49 +0300 Message-Id: X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD91AE02D33A9C88A2FAC52BB37A480E789638BB4D06A25224200894C459B0CD1B91267C00C6EFCC698DCEAE6B9ED84F43359451B28AE1D56591DFC3049464E9EA7 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE75DF2B1F23425CAE5EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637CDA089757FB31C668638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8464F360A8570BD60BBDFFDCFB808A595117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCF1175FABE1C0F9B6A471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F44604297287769387670735209ECD01F8117BC8BEA471835C12D1D977C4224003CC8364762BB6847A3DEAEFB0F43C7A68FF6260569E8FC8737B5C2249EC8D19AE6D49635B68655334FD4449CB9ECD01F8117BC8BEAAAE862A0553A39223F8577A6DFFEA7C289736CE4F78F08343847C11F186F3C59DAA53EE0834AAEE X-C1DE0DAB: C20DE7B7AB408E4181F030C43753B8186998911F362727C414F749A5E30D975CBF3286B3348795C629F88DEDB5BD98529F2F9011C2D5B7BA9C2B6934AE262D3EE7EAB7254005DCEDF1D44946AC0875EC1E0A4E2319210D9B64D260DF9561598F01A9E91200F654B0D18C7F408F36097E8E8E86DC7131B365E7726E8460B7C23C X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D341E2D05735FCBECD16A75BD39FE3E1DF1DDCB98DA1E65A499015DF9FE63B1DBDBB0AC8B075AD82B0A1D7E09C32AA3244C6E6A891B49ED3802EBD90B2D64DB1CA85595C85A795C7BAE729B2BEF169E0186 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojFfmM42hctyT8jxq7a5pnBg== X-Mailru-Sender: 689FA8AB762F7393C37E3C1AEC41BA5D6F3AA070206266864FE6D03C83FE815583D72C36FC87018B9F80AB2734326CD2FB559BB5D741EB96352A0ABBE4FDA4210A04DAD6CC59E33667EA787935ED9F1B X-Mras: Ok Subject: [Tarantool-patches] [PATCH v1 00/13] sql: reworks 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 reworks aggregate functions. After this patch-set they should work according to new rules. Non-aggregate SQL built-in functions will be reworked in another patch-set. https://github.com/tarantool/tarantool/issues/4145 https://github.com/tarantool/tarantool/tree/imeevma/gh-4145-aggregate-functions Mergen Imeev (13): sql: use register P1 for number of arguments sql: remove AggStep0 and OP_BuiltinFunction0 sql: move collation to struct sql_context sql: introduce mem_append() sql: remove sql_vdbemem_finalize() sql: rework SUM() sql: rework TOTAL() sql: rework AVG() sql: rework COUNT() sql: rework MIN() and MAX() sql: rework GROUP_CONCAT() sql: remove copying of result in finalizers sql: remove MEM_TYPE_AGG src/box/sql/date.c | 43 -- src/box/sql/expr.c | 19 +- src/box/sql/func.c | 528 +++++++++-------------- src/box/sql/mem.c | 75 +--- src/box/sql/mem.h | 29 +- src/box/sql/select.c | 32 +- src/box/sql/sqlInt.h | 16 +- src/box/sql/vdbe.c | 178 ++------ src/box/sql/vdbeInt.h | 6 +- src/box/sql/vdbeapi.c | 66 --- src/box/sql/vdbeaux.c | 11 +- test/sql-tap/built-in-functions.test.lua | 97 ++++- 12 files changed, 419 insertions(+), 681 deletions(-) -- 2.25.1