Skip to content
Snippets Groups Projects
Commit 1b39cbcf authored by Nikita Pettik's avatar Nikita Pettik
Browse files

sql: allow nil to be returned from UDF

Any user defined function features assumed type of returned value
(if it is not set explicitly during UDF creation, then it is ANY).
After function's invocation in SQL, type of returned value is checked to
be compatible with mentioned type of returned value specified in
function's definition. It is done by means of
field_mp_plain_type_is_compatible(). This functions accepts
'is_nullable' arguments which indicates whether value can be nullable or
not. For some reason 'is_nullable' is set to 'false' in our particular
case. Hence, nils can't be returned from UDF for SCALAR types.

Since there's no reason why nils can't be returned from UDFs,
let's fix this unfortunate bug.
parent a1155c8b
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment