From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 1231421BB8 for ; Tue, 13 Aug 2019 16:38:16 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dJsN4kZK8frG for ; Tue, 13 Aug 2019 16:38:16 -0400 (EDT) Received: from smtpng1.m.smailru.net (smtpng1.m.smailru.net [94.100.181.251]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id C6CA6211EB for ; Tue, 13 Aug 2019 16:38:15 -0400 (EDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: [tarantool-patches] Re: [PATCH v2 5/8] sql: introduce a signature_mask for functions From: "n.pettik" In-Reply-To: <6f6689986b1dd79adc478c5da9f1d458da42d483.1565275469.git.kshcherbatov@tarantool.org> Date: Tue, 13 Aug 2019 23:38:13 +0300 Content-Transfer-Encoding: quoted-printable Message-Id: <7757F437-0AEA-4554-A239-59E07DF56E46@tarantool.org> References: <6f6689986b1dd79adc478c5da9f1d458da42d483.1565275469.git.kshcherbatov@tarantool.org> Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-Help: List-Unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-Subscribe: List-Owner: List-post: List-Archive: To: tarantool-patches@freelists.org Cc: Kirill Shcherbatov > On 8 Aug 2019, at 17:50, Kirill Shcherbatov = wrote: >=20 > This patch replaces nArgs field with signature_mask bitmask that > allows to use an only hash table entry for all builtin functions > overloads. >=20 > The code refactoring is not a goal of this patch: the most of > affected code would be removed in following patches. The role of > this patch itself is to introduce such mechanism (signature_mask) > in Tarantool's SQL. TBO I do not understand why should you bother about function overloading depending on count of arguments. Why can=E2=80=99t we simply incapsulate this by dispatching arguments count like we do for trim function? Or, in case function is able to take var args, let just add another one flag indicating this fact. This mask make things be complicated: you have to add custom sql_func_by_signature() etc.