Tarantool development patches archive
 help / color / mirror / Atom feed
* [Tarantool-patches] [PATCH v2 0/6] Rework implicit cast
@ 2021-08-06  6:42 Mergen Imeev via Tarantool-patches
  2021-08-06  6:42 ` [Tarantool-patches] [PATCH v2 1/6] sql: rework implicit cast fo assignment Mergen Imeev via Tarantool-patches
                   ` (6 more replies)
  0 siblings, 7 replies; 9+ messages in thread
From: Mergen Imeev via Tarantool-patches @ 2021-08-06  6:42 UTC (permalink / raw)
  To: kyukhin; +Cc: tarantool-patches

This patch-set reworks implicit cast in SQL according to new rules. According to
these rules, all scalar values can be cast to SCALAR, all numeric values can be
cast to NUMBER, and any numeric value can be cast to another numeric type only
if the conversion is exact. No other implicit cast is allowed.

https://github.com/tarantool/tarantool/issues/4230
https://github.com/tarantool/tarantool/issues/4470
https://github.com/tarantool/tarantool/tree/imeevma/gh-4230-remove-implicit-cast-for-comparison-v2

Changes in v2:
 - Instead of removing, mem_cast_implicit() was reworked.
 - Removed commit that become unnecessary due to chage to mem_cast_implicit().
 - New function mem_cast_implicit_number() was moved to another commit.

Mergen Imeev (6):
  sql: rework implicit cast fo assignment
  sql: remove implicit cast from comparison opcodes
  sql: rework OP_Seek* opcodes
  sql: remove unnecessary calls of OP_ApplyType
  sql: remove implicit cast from OP_MakeRecord
  sql: remove unused MEM cast functions

 .../gh-4230-implicit-cast-for-comparison.md   |   6 +
 .../gh-4470-implicit-cast-for-assignment.md   |   6 +
 src/box/sql.c                                 |  69 +-
 src/box/sql/analyze.c                         |   7 +-
 src/box/sql/cursor.c                          |  14 -
 src/box/sql/cursor.h                          |   1 -
 src/box/sql/delete.c                          |   8 +-
 src/box/sql/expr.c                            |  39 +-
 src/box/sql/fk_constraint.c                   |   9 +-
 src/box/sql/func.c                            |  29 +-
 src/box/sql/insert.c                          |  14 -
 src/box/sql/mem.c                             | 592 ++++++++--------
 src/box/sql/mem.h                             |  57 +-
 src/box/sql/sqlInt.h                          |  25 -
 src/box/sql/tarantoolInt.h                    |   3 +
 src/box/sql/update.c                          |  14 +-
 src/box/sql/vdbe.c                            | 665 ++++++------------
 src/box/sql/vdbe.h                            |   2 +-
 src/box/sql/vdbeaux.c                         |   6 +-
 src/box/sql/where.c                           |  20 +-
 src/box/sql/wherecode.c                       | 217 +-----
 src/box/sql/whereexpr.c                       |   4 +-
 test/sql-tap/cast.test.lua                    | 152 +++-
 test/sql-tap/func5.test.lua                   |   6 +-
 test/sql-tap/identifier_case.test.lua         |  10 +-
 test/sql-tap/in1.test.lua                     |  15 +-
 test/sql-tap/in3.test.lua                     |   4 +-
 test/sql-tap/in4.test.lua                     |   4 +-
 test/sql-tap/index1.test.lua                  |   4 +-
 test/sql-tap/insert3.test.lua                 |   2 +-
 test/sql-tap/join.test.lua                    |   8 +-
 test/sql-tap/misc1.test.lua                   |  45 +-
 test/sql-tap/numcast.test.lua                 |   5 +-
 test/sql-tap/select1.test.lua                 |   6 +-
 test/sql-tap/select7.test.lua                 |   2 +-
 test/sql-tap/sql-errors.test.lua              |   4 +-
 test/sql-tap/subquery.test.lua                |   4 +-
 test/sql-tap/tkt-9a8b09f8e6.test.lua          |  54 +-
 test/sql-tap/tkt3493.test.lua                 |  54 +-
 test/sql-tap/transitive1.test.lua             |  16 +-
 test/sql-tap/uuid.test.lua                    |  60 +-
 test/sql-tap/where2.test.lua                  | 143 +---
 test/sql-tap/where5.test.lua                  |  12 +-
 test/sql/boolean.result                       | 220 +++---
 test/sql/types.result                         |  10 +-
 45 files changed, 991 insertions(+), 1656 deletions(-)
 create mode 100644 changelogs/unreleased/gh-4230-implicit-cast-for-comparison.md
 create mode 100644 changelogs/unreleased/gh-4470-implicit-cast-for-assignment.md

-- 
2.25.1


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-08-06 12:19 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-06  6:42 [Tarantool-patches] [PATCH v2 0/6] Rework implicit cast Mergen Imeev via Tarantool-patches
2021-08-06  6:42 ` [Tarantool-patches] [PATCH v2 1/6] sql: rework implicit cast fo assignment Mergen Imeev via Tarantool-patches
2021-08-06  6:42 ` [Tarantool-patches] [PATCH v2 2/6] sql: remove implicit cast from comparison opcodes Mergen Imeev via Tarantool-patches
2021-08-06  6:42 ` [Tarantool-patches] [PATCH v2 3/6] sql: rework OP_Seek* opcodes Mergen Imeev via Tarantool-patches
2021-08-06  6:42 ` [Tarantool-patches] [PATCH v2 4/6] sql: remove unnecessary calls of OP_ApplyType Mergen Imeev via Tarantool-patches
2021-08-06  6:42 ` [Tarantool-patches] [PATCH v2 5/6] sql: remove implicit cast from OP_MakeRecord Mergen Imeev via Tarantool-patches
2021-08-06  6:42 ` [Tarantool-patches] [PATCH v2 6/6] sql: remove unused MEM cast functions Mergen Imeev via Tarantool-patches
2021-08-06 12:19   ` Vitaliia Ioffe via Tarantool-patches
2021-08-06  7:04 ` [Tarantool-patches] [PATCH v2 0/6] Rework implicit cast Kirill Yukhin via Tarantool-patches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox