sql: fix comparison with SCALAR value
After this patch, SCALAR values will be able to be compared with values of any other scalar type. The comparison will be done according to the SCALAR rules, which means boolean values < numeric values < string values < binary values < uuid values. Closes #6221 @TarantoolBot document Title: SCALAR and NUMBER values in SQL SCALAR values can now be compared with values of any other scalar type, but cannot be implicitly cast to any other scalar type. This means that SCALAR values cannot participate in arithmetic, bitwise operations, concatenation, or functions that, by definition, do not accept SCALAR values. NUMBER values now also cannot be implicitly cast to any other numeric type, which means that NUMBER values cannot participate in arithmetic and bitwise operations, or in functions that, by definition, do not accept NUMBER values.
Showing
- changelogs/unreleased/gh-6221-re-introduce-scalar-and-number-types.md 8 additions, 0 deletions...nreleased/gh-6221-re-introduce-scalar-and-number-types.md
- src/box/sql/mem.c 4 additions, 0 deletionssrc/box/sql/mem.c
- test/sql-tap/cast.test.lua 2 additions, 2 deletionstest/sql-tap/cast.test.lua
- test/sql-tap/metatypes.test.lua 50 additions, 1 deletiontest/sql-tap/metatypes.test.lua
- test/sql/boolean.result 10 additions, 4 deletionstest/sql/boolean.result
Loading
Please register or sign in to comment