[tarantool-patches] Re: [PATCH v2 5/8] sql: introduce a signature_mask for functions
n.pettik
korablev at tarantool.org
Tue Aug 13 23:38:13 MSK 2019
> On 8 Aug 2019, at 17:50, Kirill Shcherbatov <kshcherbatov at tarantool.org> wrote:
>
> This patch replaces nArgs field with signature_mask bitmask that
> allows to use an only hash table entry for all builtin functions
> overloads.
>
> 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’t 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.
More information about the Tarantool-patches
mailing list