[Tarantool-discussions] The result type and argument types of the built-in SQL functions.
Mergen Imeev
imeevma at tarantool.org
Wed Jul 29 12:34:50 MSK 2020
On Wed, Jul 29, 2020 at 11:54:12AM +0300, Timur Safin wrote:
>
> I general, I agree that UNSIGNED is unnecessary, but the rest of table
> is pretty much ok with me. (Though blob vs string discussion opened elsewhere
> is important)
>
> With one small note below...
>
> : From: Mergen Imeev <imeevma at tarantool.org>
> : Subject: The result type and argument types of the built-in SQL functions.
> :
> : Hi, Peter!
> :
> : I would like to ask you a few questions about the result type and argument
> : types of the SQL built-in functions.
> :
> : I suggest changing the result types of some functions. A table with the
> : current
> : result type and the suggested result type is below.
> :
> : FUNCTION NAME CURRENT SUGGESTED
> : abs number number
> : avg number double
> : char string string
> : character_length integer unsigned
> ...
> : soundex string string
> : substr string string
> : sum number number
> : total number double
>
> Why total should be different than sum? (I'd use the same number)
>
In SQLite TOTAL always returns DOUBLE. SUM may return INTEGER if all values
are of INTEGER type.
>
> Regards,
> Timur
>
More information about the Tarantool-discussions
mailing list