[tarantool-patches] Re: [PATCH v2 4/8] sql: get rid of SQL_FUNC_COUNT flag

Kirill Shcherbatov kshcherbatov at tarantool.org
Wed Aug 14 10:25:41 MSK 2019


>> A helper routine is_simple_count decides whether such
>> optimisation is correct. Using SQL_FUNC_COUNT flag to mark a
>> dummy (non-functional)
> 
> Why do you consider it to be non-functional?
> 
>> function entry with 0 arguments is a bad practice
> 
> Why? Please, support this with arguments.
Because the hastable entry define a function that **NEVER** called.
It relies on arguments overloading and it is strange.

> Hm, this code works just by accident :) There’s no check
> that function is really COUNT, but we are lucky enough
> and there’s no other aggregate function which can take
> empty list of arguments...
Maybe because the helper function's name is "is_simple_count"? =)




More information about the Tarantool-patches mailing list