[Tarantool-patches] [PATCH v1 0/7] Rework implicit cast
imeevma at tarantool.org
imeevma at tarantool.org
Wed Jul 28 23:51:06 MSK 2021
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
Mergen Imeev (7):
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 implicit cast from OP_MustBeInt
sql: remove unused MEM cast functions
.../gh-4230-implicit-cast-for-comparison.md | 3 +
.../gh-4470-implicit-cast-for-assignment.md | 3 +
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 | 9 +-
src/box/sql/fk_constraint.c | 9 +-
src/box/sql/func.c | 29 +-
src/box/sql/insert.c | 14 -
src/box/sql/mem.c | 618 ++++++--------
src/box/sql/mem.h | 89 +-
src/box/sql/sqlInt.h | 4 -
src/box/sql/tarantoolInt.h | 3 +
src/box/sql/update.c | 14 +-
src/box/sql/vdbe.c | 789 ++++++++----------
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 | 4 +-
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 | 68 +-
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, 1076 insertions(+), 1703 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
More information about the Tarantool-patches
mailing list