From: Nikita Pettik <korablev@tarantool.org> To: imeevma@tarantool.org Cc: tarantool-patches@dev.tarantool.org Subject: Re: [Tarantool-patches] [PATCH v6 04/22] sql: check args of avg(), sum() and total() Date: Thu, 16 Jul 2020 16:21:11 +0000 [thread overview] Message-ID: <20200716162111.GB433@tarantool.org> (raw) In-Reply-To: <d64262254e0eef6ac6fca9b0c4c45c2e32399e64.1594909974.git.imeevma@gmail.com> On 16 Jul 17:45, imeevma@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 >
next prev parent reply other threads:[~2020-07-16 16:21 UTC|newest] Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-07-16 14:45 [Tarantool-patches] [PATCH v6 00/22] sql: change implicit cast imeevma 2020-07-16 14:45 ` [Tarantool-patches] [PATCH v6 01/22] sql: change implicit cast for assignment imeevma 2020-07-16 14:45 ` [Tarantool-patches] [PATCH v6 02/22] sql: use ApplyType to check function arguments imeevma 2020-07-16 14:45 ` [Tarantool-patches] [PATCH v6 03/22] sql: check args of abs() imeevma 2020-07-16 16:12 ` Nikita Pettik 2020-07-16 14:45 ` [Tarantool-patches] [PATCH v6 04/22] sql: check args of avg(), sum() and total() imeevma 2020-07-16 16:21 ` Nikita Pettik [this message] 2020-07-16 14:45 ` [Tarantool-patches] [PATCH v6 05/22] sql: check args of char() imeevma 2020-07-16 16:27 ` Nikita Pettik 2020-07-16 14:45 ` [Tarantool-patches] [PATCH v6 06/22] sql: check args of length() imeevma 2020-07-16 16:31 ` Nikita Pettik 2020-07-16 14:46 ` [Tarantool-patches] [PATCH v6 07/22] sql: check operands of LIKE imeevma 2020-07-16 17:03 ` Nikita Pettik 2020-07-16 14:46 ` [Tarantool-patches] [PATCH v6 08/22] sql: check args of lower() and upper() imeevma 2020-07-16 17:09 ` Nikita Pettik 2020-07-16 14:46 ` [Tarantool-patches] [PATCH v6 09/22] sql: check args of position() imeevma 2020-07-16 17:28 ` Nikita Pettik 2020-07-16 14:46 ` [Tarantool-patches] [PATCH v6 10/22] sql: check args of randomblob() imeevma 2020-07-16 17:28 ` Nikita Pettik 2020-07-16 14:46 ` [Tarantool-patches] [PATCH v6 11/22] sql: check args of replace() imeevma 2020-07-16 14:46 ` [Tarantool-patches] [PATCH v6 12/22] sql: check args of round() imeevma 2020-07-16 14:46 ` [Tarantool-patches] [PATCH v6 13/22] sql: check args of soundex() imeevma 2020-07-16 14:47 ` [Tarantool-patches] [PATCH v6 14/22] sql: check args of substr() imeevma 2020-07-16 14:47 ` [Tarantool-patches] [PATCH v6 15/22] sql: check args of unicode() imeevma 2020-07-16 14:47 ` [Tarantool-patches] [PATCH v6 16/22] sql: check args of zeroblob() imeevma 2020-07-16 14:47 ` [Tarantool-patches] [PATCH v6 17/22] sql: remove unused DOUBLE to INTEGER conversion imeevma 2020-07-16 14:47 ` [Tarantool-patches] [PATCH v6 18/22] sql: add implicit cast between numbers in OP_Seek* imeevma 2020-07-16 14:47 ` [Tarantool-patches] [PATCH v6 19/22] sql: change comparison between numbers using index imeevma 2020-07-16 14:47 ` [Tarantool-patches] [PATCH v6 20/22] sql: remove implicit cast from comparison opcodes imeevma 2020-07-16 14:47 ` [Tarantool-patches] [PATCH v6 21/22] sql: fix implicit cast in opcode MustBeInt imeevma 2020-07-16 14:47 ` [Tarantool-patches] [PATCH v6 22/22] sql: remove implicit cast from MakeRecord opcode imeevma
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=20200716162111.GB433@tarantool.org \ --to=korablev@tarantool.org \ --cc=imeevma@tarantool.org \ --cc=tarantool-patches@dev.tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH v6 04/22] sql: check args of avg(), sum() and total()' \ /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