sql: define default types for built-in functions
After this patch, all functions that take arguments of one of two or more types have defined a default type, which is used when the argument type cannot be determined. Closes #6483 @TarantoolBot document Title: Default types of SQL built-in functions In case a function takes an argument of one of two or more types, this function has defined the default type for this argument. This type is used when the type of the argument cannot be determined, for example, in the case of a bound variable. Rules for determining default types as follows: 1) When there is only one possible type, it is default. 2) When possible types are INTEGER, DOUBLE or DECIMAL, DECIMAL is default. 3) When possible types are STRING or VARBINARY, STRING is default. 4) When possible data types are any other scalar data type, SCALAR is default. 5) Otherwise, there is no default type.
Showing
- changelogs/unreleased/gh-6483-default-type-for-builtins.md 4 additions, 0 deletionschangelogs/unreleased/gh-6483-default-type-for-builtins.md
- src/box/sql/func.c 6 additions, 6 deletionssrc/box/sql/func.c
- test/sql-tap/built-in-functions.test.lua 122 additions, 5 deletionstest/sql-tap/built-in-functions.test.lua
- test/sql-tap/metatypes.test.lua 4 additions, 4 deletionstest/sql-tap/metatypes.test.lua
Loading
Please register or sign in to comment