Tarantool development patches archive
 help / color / mirror / Atom feed
From: Nikita Pettik <korablev@tarantool.org>
To: tarantool-patches@dev.tarantool.org
Cc: v.shpilevoy@tarantool.org
Subject: [Tarantool-patches] [PATCH 0/4] sql: fix NUMBER conversion issues
Date: Wed,  5 Feb 2020 19:19:08 +0300	[thread overview]
Message-ID: <cover.1580841722.git.korablev@tarantool.org> (raw)

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

             reply	other threads:[~2020-02-05 16:19 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-05 16:19 Nikita Pettik [this message]
2020-02-05 16:19 ` [Tarantool-patches] [PATCH 1/4] sql: remove cast to INT during FP arithmetic ops Nikita Pettik
2020-02-05 16:19 ` [Tarantool-patches] [PATCH 2/4] sql: refactor sqlVdbeMemNumerify() Nikita Pettik
2020-02-10 23:25   ` Vladislav Shpilevoy
2020-02-11 14:14     ` Nikita Pettik
2020-02-11 22:17       ` Vladislav Shpilevoy
2020-02-05 16:19 ` [Tarantool-patches] [PATCH 3/4] sql: fix CAST AS NUMBER operator Nikita Pettik
2020-02-10 23:24   ` Vladislav Shpilevoy
2020-02-11 14:14     ` Nikita Pettik
2020-02-11 22:17       ` Vladislav Shpilevoy
2020-02-11 23:20         ` Nikita Pettik
2020-02-11 23:27           ` Vladislav Shpilevoy
2020-02-12 14:10             ` Nikita Pettik
2020-02-05 16:19 ` [Tarantool-patches] [PATCH 4/4] sql: do not force FP representation for NUMBER field Nikita Pettik
2020-02-10 23:24   ` Vladislav Shpilevoy
2020-02-11 14:14     ` Nikita Pettik
2020-02-09 17:39 ` [Tarantool-patches] [PATCH 0/4] sql: fix NUMBER conversion issues Vladislav Shpilevoy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1580841722.git.korablev@tarantool.org \
    --to=korablev@tarantool.org \
    --cc=tarantool-patches@dev.tarantool.org \
    --cc=v.shpilevoy@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH 0/4] sql: fix NUMBER conversion issues' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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