[Tarantool-patches] [PATCH 0/3] sql: modify explicit conversion tables
Timur Safin
tsafin at tarantool.org
Tue May 25 12:00:59 MSK 2021
Recent RFC "Consistent Lua/SQL types" (#6009) defined ideal explicit
and implicit conversion tables we would like to have for all current
and future Taranool SQL types.
This patchset modifies explict conversion tables, and implicit
conversion table to come soon. The ideal picture would be as below:
| 0 | 1 | 2 | 4 | 5 | 6 | 7 | 3 | 9 |10 |11 |12 | 8 |
+---+---+---+---+---+---+---+---+---+---+---+---+---+
0. any | | | | | | | | | | | | | |
1. unsigned | | Y | Y | Y | Y | | | Y | | | | | Y |
2. string | | S | Y | S | S | S | Y | S | | | | | Y |
4. double | | S | Y | Y | S | | | Y | | | | | Y |
5. integer | | S | Y | Y | Y | | | Y | | | | | Y |
6. boolean | | | Y | | | Y | | | | | | | Y |
7. varbinary | | | Y | | | | Y | | | | | | Y |
3. number | | S | Y | Y | S | | | Y | | | | | Y |
9. decimal | | | | | | | | | | | | | |
10. uuid | | | | | | | | | | | | | |
11. array | | | | | | | | | | | | | |
12. map | | | | | | | | | | | | | |
8. scalar | | S | Y | S | S | S | S | S | | | | | Y |
+---+---+---+---+---+---+---+---+---+---+---+---+---+
Please pay attention that we omit DECIMAL, UUID, SCALAR and MAP rows
and columns, as they not yet fully supported by Tarantool SQL. Once
their support will be landed we will modify conversion table and
tests (which we also introducing with current patchset).
Timur Safin (3):
sql: fixes for boolean expressions in explicit converstion tables
sql: enabled ANY as target for explicit conversions
sql: introduced explicit casts test e_casts.test.lua
extra/mkkeywordhash.c | 3 +-
src/box/sql/mem.c | 39 +---
src/box/sql/parse.y | 3 +-
test/sql-tap/cse.test.lua | 12 +-
test/sql-tap/e_casts.test.lua | 355 ++++++++++++++++++++++++++++++++
test/sql-tap/e_select1.test.lua | 2 +-
test/sql-tap/in1.test.lua | 16 +-
test/sql-tap/keyword1.test.lua | 2 +-
test/sql-tap/misc3.test.lua | 2 +-
test/sql/boolean.result | 38 +---
test/sql/types.result | 14 +-
11 files changed, 390 insertions(+), 96 deletions(-)
create mode 100755 test/sql-tap/e_casts.test.lua
--
2.29.2
More information about the Tarantool-patches
mailing list