sql: add support of DECIMAL and INTEGER to ROUND()
This patch fixes an issue with the implicit cast of INTEGER and DECIMAL values to DOUBLE when they are passed as the first argument to the ROUND() function. Closes #6988 @TarantoolBot document Title: ROUND() now properly supports INTEGER and DECIMAL INTEGER and DECIMAL values passed as the first argument now will not be cast to DOUBLE and the result will be of the same type as the first argument. Also, the default type for the ROUND() is now DECIMAL.
Showing
- changelogs/unreleased/gh-6988-support-of-int-dec-to-round.md 4 additions, 0 deletionschangelogs/unreleased/gh-6988-support-of-int-dec-to-round.md
- src/box/sql/func.c 41 additions, 4 deletionssrc/box/sql/func.c
- test/sql-luatest/gh_6988_add_round_implementations_test.lua 74 additions, 0 deletionstest/sql-luatest/gh_6988_add_round_implementations_test.lua
- test/sql-tap/built-in-functions.test.lua 1 addition, 1 deletiontest/sql-tap/built-in-functions.test.lua
- test/sql-tap/func.test.lua 22 additions, 22 deletionstest/sql-tap/func.test.lua
- test/sql-tap/metatypes.test.lua 1 addition, 1 deletiontest/sql-tap/metatypes.test.lua
Loading
Please register or sign in to comment