[Tarantool-patches] [PATCH v6 04/22] sql: check args of avg(), sum() and total()
Nikita Pettik
korablev at tarantool.org
Thu Jul 16 19:21:11 MSK 2020
On 16 Jul 17:45, imeevma at tarantool.org wrote:
> After this patch, the argument types of the avg(), sum() and total()
> functions will be checked properly.
>
> Part of #4159
> ---
> src/box/sql/func.c | 18 ++---
> test/sql-tap/func.test.lua | 8 +-
> test/sql-tap/func5.test.lua | 149 +++++++++++++++++++++++++++++++++++-
> 3 files changed, 157 insertions(+), 18 deletions(-)
>
> +
> +test:do_catchsql_test(
> + "func-5-6.4.7", [[
> + SELECT total("_auto_field_") from (values (X'3334'), (X'3334'), (X'3334'));
> + ]], {
> + 1, "Type mismatch: can not convert varbinary to number"
> + })
>
Why don't you use arguemnts of different types? Like numb+numb+bool?
+
> test:finish_test()
> --
> 2.25.1
>
More information about the Tarantool-patches
mailing list