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 BD55B6F867; Fri, 4 Feb 2022 02:30:34 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org BD55B6F867 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1643931034; bh=0keObD8FhLKQae/XQFpbKp/BiGdVLLDL1QF7rZCjKAs=; 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=giMv7bldr2Yb3o2M1oYdmSkyzbjxvkVcUrDjR+ztUhuUF1u/w8+oZVVD+v6bDV0Cn IoZYX18kVNHUXWKSqOV8EfOPyTjylOJHKwM4Y4qX9k/sfeVRU0I2iK/g9UvrCBV8tM Q7/dZKwmYWqUKGRIUsRgrPCaFoAdu4seKaljINzQ= Received: from smtpng3.i.mail.ru (smtpng3.i.mail.ru [94.100.177.149]) (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 C45996F867 for ; Fri, 4 Feb 2022 02:30:25 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org C45996F867 Received: by smtpng3.m.smailru.net with esmtpa (envelope-from ) id 1nFlYX-0002qS-5g; Fri, 04 Feb 2022 02:30:25 +0300 Message-ID: Date: Fri, 4 Feb 2022 00:30:24 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.5.1 Content-Language: en-US To: imeevma@tarantool.org Cc: tarantool-patches@dev.tarantool.org References: <162eb863bee6a45a63ee85604ce004d83e8aedfa.1643722506.git.imeevma@gmail.com> In-Reply-To: <162eb863bee6a45a63ee85604ce004d83e8aedfa.1643722506.git.imeevma@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9C2F57BB0C041E51F53B9886DA1720103A9A3B87132B3E5EE00894C459B0CD1B9696EAB201DAB5486EBD0DEE1C74BABA79FDF31ADBFB9F5913C5A36B8DDD67158 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE70B8ADF238913687CB287FD4696A6DC2FA8DF7F3B2552694A4E2F5AFA99E116B42401471946AA11AF1661749BA6B977355644E22E05AA81AE52120BFB3F63BC185F65E78799B30205C33C3ADAEA971F8E611E41BBFE2FEB2B95D3B1D0954376005581A38440CA163A193B7E85103DE131389733CBF5DBD5E913377AFFFEAFD269176DF2183F8FC7C0A3E989B1926288338941B15DA834481FCF19DD082D7633A0EF3E4896CB9E6436389733CBF5DBD5E9D5E8D9A59859A8B6957A4DEDD2346B42CC7F00164DA146DA6F5DAA56C3B73B237318B6A418E8EAB86D1867E19FE14079C09775C1D3CA48CF3D321E7403792E342EB15956EA79C166A417C69337E82CC275ECD9A6C639B01B78DA827A17800CE798228CBAD4AC77F6731C566533BA786AA5CC5B56E945C8DA X-8FC586DF: 6EFBBC1D9D64D975 X-C1DE0DAB: 0D63561A33F958A50E8F9ABD00630E6E03110FFDAB80EC9617F040483125AA36D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA75BF6B963DD989C0FC410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D346B1FF97F6D0959A222EE6F53ED766E56FAD4FF7DEC2EABFCE01F6B848B365791A2F8A1A83ACA018A1D7E09C32AA3244C7B5D6CB7ADDE2B75C5807137317B76B27C0C08F7987826B9729B2BEF169E0186 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojR8wit7+bEcdUqLE8lPYxfA== X-Mailru-Sender: 689FA8AB762F739339CABD9B3CA9A7D65FA3F8FBC636A09CE269B0A49C8630AC3841015FED1DE5223CC9A89AB576DD93FB559BB5D741EB963CF37A108A312F5C27E8A8C3839CE0E25FEEDEB644C299C0ED14614B50AE0675 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v2 4/4] sql: introduce FINALIZE for custom aggregate 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! > Example: > ``` > box.schema.func.create("F1_finalize", { > language = "Lua", > body = [[ > function(state) > if state == nil then > return 0 > end > return state.sum / state.count > end > ]], > param_list = {"map"}, > returns = "number", > exports = {'LUA', 'SQL'}, > }) I thought of another approach - let to call the function any name, make {aggregate = "finalize", source = "F1"}. So it is like a foreign key. But up to you whether you like it and whether you will try to bring it up with the product managers. > box.execute('SELECT f1(i) FROM t;') The commit technically LGTM.