[Tarantool-patches] [PATCH 0/4] sql: fix NUMBER conversion issues
Nikita Pettik
korablev at tarantool.org
Wed Feb 5 19:19:08 MSK 2020
Branch: https://github.com/tarantool/tarantool/tree/np/gh-4233-fix-number-field-type-in-sql
Issue:
https://github.com/tarantool/tarantool/issues/4233
https://github.com/tarantool/tarantool/issues/4463
This patch-set makes NUMBER behaviour be closer to the one defined
in Tarantool NoSQL.
This is rework of https://github.com/tarantool/tarantool/tree/imeevma/gh-4233-fix-number-field-type-in-sql
Functional changes: fixed CAST boolean AS NUMBER operation - now it is
allowed to cast booleans to number type (since boolean can be casted to
integer, and in turn NUMBER type comprises integer type).
Refactoring: splitted patch in a series of independent ones; fixed
codestyle of sqlVdbeMemNumerify().
To the one who will review: this patch-series goes-around since
athour of original patch does not agree with suggested (by me) fixes.
Hence I guess second review iteration is required.
Nikita Pettik (4):
sql: remove cast to INT during FP arithmetic ops
sql: refactor sqlVdbeMemNumerify()
sql: fix CAST AS NUMBER operator
sql: do not force FP representation for NUMBER field
src/box/sql/vdbe.c | 15 +----
src/box/sql/vdbeInt.h | 12 +++-
src/box/sql/vdbemem.c | 65 +++++++--------------
test/sql-tap/cast.test.lua | 32 +++++------
test/sql-tap/e_select1.test.lua | 2 +-
test/sql-tap/numcast.test.lua | 106 ++++++++++++++++++++++++++++++++++-
test/sql-tap/sort.test.lua | 12 ++--
test/sql-tap/tkt-91e2e8ba6f.test.lua | 12 ++--
test/sql/boolean.result | 9 ++-
test/sql/integer-overflow.result | 2 +-
test/sql/types.result | 2 +-
11 files changed, 176 insertions(+), 93 deletions(-)
--
2.15.1
More information about the Tarantool-patches
mailing list