[tarantool-patches] Re: [PATCH v2 5/8] sql: introduce a signature_mask for functions

Kirill Shcherbatov kshcherbatov at tarantool.org
Tue Aug 13 11:32:36 MSK 2019


> +	 * The count of arguments for function is limited with
>> +	 * (CHAR_BITS*sizeof(uint64_t) - 1). When the highest bit
>> +	 * of the mask is set, this means that greater values
>> +	 * are supported. E.g. greatest function works correctly
>> +	 * with any number of input arguments.
>> +	 */
>> +	uint64_t signature_mask;
> 
> Good idea, but why make the mask sooo big?-)))
> I don't think we have more than 3 arguments in any overloaded
> function?
63 arguments is not too much for UDF (this would use for UDF too), I guess.
Moreover, column_mask API is worked with 64bit bitmasks.

> 
>> +	if (!column_mask_fieldno_is_set(p->signature_mask, (uint32_t)nArg))
>>  		return 0;
> 
> Are you sure you want to use column mask api just to test a bit?
It is convenient, because column_mask is "smart" and it also return true for
fieldno > 64: this is ok for uniform scalar functions like
GREATEST(1,.......)




More information about the Tarantool-patches mailing list