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 897656EC40; Thu, 23 Sep 2021 01:51:25 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 897656EC40 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1632351085; bh=mI+N3Vd/6OqMCiywvn+90/ii62UE0+WQJxvukBrrdbk=; h=To:Cc:References:Date:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=oaujADXyg5fS5tUHoLExhfnr+KSMXxksZuH4Oj6UpJ37EkXsfL0fgtBy0iBXVrXkK 9H8xWEcZcJSvZlOy0So2CyqjD//uA3jHf+QokHouh8QAudUFL+Tkw+mtDtngVw3dts BBfZI9wPw/yKynNjm3s5PVBFXRZA5oDthOzArphE= 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 69EDC6EC40 for ; Thu, 23 Sep 2021 01:51:24 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 69EDC6EC40 Received: by smtpng3.m.smailru.net with esmtpa (envelope-from ) id 1mTB5H-00013J-RK; Thu, 23 Sep 2021 01:51:24 +0300 To: imeevma@tarantool.org Cc: tarantool-patches@dev.tarantool.org References: <17afb79fd990215380cff10d6a515a717a21850b.1632220375.git.imeevma@gmail.com> Message-ID: Date: Thu, 23 Sep 2021 00:51:22 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <17afb79fd990215380cff10d6a515a717a21850b.1632220375.git.imeevma@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD91AE02D33A9C88A2FF5D850F13DC95A512EADF88CC27D273A00894C459B0CD1B9BF75E06D5BEAA0D4B7D6DF61C3956FCE016E8B5CE2B675A4261E30AE1A3D8EFE X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7E188839ED9CF357EEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637EEA194BB48C104EF8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D811A01298B8CC56FFF30C6E7790EDFE7B117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCECADA55FE5B58BB7A471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F4460429728776938767073520B28585415E75ADA96FD1C55BDD38FC3FD2E47CDBA5A96583BA9C0B312567BB231DD303D21008E29813377AFFFEAFD269A417C69337E82CC2E827F84554CEF50127C277FBC8AE2E8BA83251EDC214901ED5E8D9A59859A8B6A45692FFBBD75A6A089D37D7C0E48F6C5571747095F342E88FB05168BE4CE3AF X-B7AD71C0: AC4F5C86D027EB782CDD5689AFBDA7A213B5FB47DCBC3458834459D11680B505399A639CCD4738131C0930925DF36A27 X-C1DE0DAB: 0D63561A33F958A51C2D7763F77931F2E4597386DC9A1F6AF8DD3ECFEDB37B94D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA759D2A03B9C34326B3410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D348F1757F8DFBC5C3362DF5E7181C7D1B98F5D88B7D496FB9168165DEEF0A968B15C6CEEF35F574C6E1D7E09C32AA3244CB2C01C82AFB374AEBEE6782FFC4ECC0E55E75C8D0ED9F6EE729B2BEF169E0186 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojYVPXnTWjYf7oe6FH2NhWMw== X-Mailru-Sender: 689FA8AB762F7393C37E3C1AEC41BA5D22A7B0DFE0D0CAD7AF00A622752AAAFD3841015FED1DE5223CC9A89AB576DD93FB559BB5D741EB963CF37A108A312F5C27E8A8C3839CE0E267EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v2 15/15] sql: remove field argv from struct sql_context 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! > diff --git a/src/box/sql/func.c b/src/box/sql/func.c > index cdfb020cb..6cbbbac74 100644 > --- a/src/box/sql/func.c > +++ b/src/box/sql/func.c > @@ -55,31 +55,31 @@ static struct func_sql_builtin **functions; > > /** Implementation of the SUM() function. */ > static void > -step_sum(struct sql_context *ctx, int argc, struct Mem **argv) > +step_sum(struct sql_context *ctx, int argc, struct Mem *argv) Is it a good idea? This way you force to allocate the Mem array. But what if I have a function call like func(col1, col10, col20), where colN are columns of a tuple? They are stored in Mems, so previously it would be possible to pass &col1, &col10, &col20. Now you have no choice but to allocate 3 * sizeof(Mem) and ephem-copy the mems. How does func(col1, col10, col20) behave before this patch? Does it copy the cols even now?