From: Nikita Pettik <korablev@tarantool.org>
To: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH] sql: allow nil to be returned from UDF
Date: Wed, 25 Dec 2019 03:40:12 +0300 [thread overview]
Message-ID: <20191225004012.GB18639@tarantool.org> (raw)
In-Reply-To: <6ff37ee003c8278c1676e72277c4033dae3e0871.1576692754.git.korablev@tarantool.org>
On 18 Dec 21:27, Nikita Pettik wrote:
> 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.
> ---
> Branch: https://github.com/tarantool/tarantool/tree/np/fix-sql-func-ret-nullability
>
> src/box/sql/vdbe.c | 2 +-
> test/sql-tap/func.test.lua | 36 ++++++++++++++++++------------------
> 2 files changed, 19 insertions(+), 19 deletions(-)
Pushed to master as obvious.
prev parent reply other threads:[~2019-12-25 0:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-18 18:27 Nikita Pettik
2019-12-25 0:40 ` Nikita Pettik [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191225004012.GB18639@tarantool.org \
--to=korablev@tarantool.org \
--cc=tarantool-patches@dev.tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH] sql: allow nil to be returned from UDF' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox