[Tarantool-patches] [PATCH v2 02/10] sql: fix functions return types
Vladislav Shpilevoy
v.shpilevoy at tarantool.org
Sat Aug 22 17:24:12 MSK 2020
Thanks for the patch!
On 14.08.2020 17:04, imeevma at tarantool.org wrote:
> This patch fixes incorrect return types in SQL built-in function definitions.
Why are they incorrect? You need to provide more descriptive message.
It took for me some time to scan the sqlite doc to find what do these
functions do and why do you change their types.
> ---
> src/box/sql/func.c | 10 +++++-----
> test/sql/types.result | 4 ++--
> 2 files changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/src/box/sql/func.c b/src/box/sql/func.c
> index 487cdafe1..affb285aa 100644
> --- a/src/box/sql/func.c
> +++ b/src/box/sql/func.c
"UNLIKELY" still returns boolean. But according to the doc, it
should return the single argument unchanged. So also should be
SCALAR.
Please, check the other functions too.
Also you need to add tests on the changed types. For example,
you changed likely() return type, but I don't see any tests
failing. So looks like it is not covered.
More information about the Tarantool-patches
mailing list