Tarantool development patches archive
 help / color / mirror / Atom feed
* [tarantool-patches] [PATCH 0/2] Improve operability of typeof() function
@ 2019-07-27 18:45 Nikita Pettik
  2019-07-27 18:45 ` [tarantool-patches] [PATCH 1/2] sql: extend struct Mem with field_type member Nikita Pettik
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Nikita Pettik @ 2019-07-27 18:45 UTC (permalink / raw)
  To: tarantool-patches; +Cc: v.shpilevoy, Nikita Pettik

Branch: https://github.com/tarantool/tarantool/compare/np/gh-4148-add-field-type-to-mem
Issue: https://github.com/tarantool/tarantool/issues/4148

First patch adds field_type member to struct Mem. It allows to
improve type calculation for NULL values: when value is fetched
from tuple, field_type is assigned to the type of corresponding
field in space format. So that NULL from field with INTEGER type
now has INTEGER type, from REAL - REAL etc. The only exception is
SCALAR type since it's not basic type but rather aggregation of
types. Thus, NULL values from SCALAR field features default type
(in the next patch it is changed to BOOLEAN).

Second patch switches default type of NULL literal to boolean as it
was decided to do during numerous discussions in mailing list. See
commit message for details.

Nikita Pettik (2):
  sql: extend struct Mem with field_type member
  sql: make default type of NULL be boolean

 src/box/sql/func.c          | 14 +++++++++++++-
 src/box/sql/vdbe.c          | 36 +++++++++++++++++++++++++++++++++++-
 src/box/sql/vdbeInt.h       | 11 +++++++++++
 src/box/sql/vdbeapi.c       |  1 +
 src/box/sql/vdbeaux.c       |  1 +
 src/box/sql/vdbemem.c       |  3 +++
 src/box/sql/vdbesort.c      |  6 ++++++
 test/sql-tap/cast.test.lua  | 12 ++++++------
 test/sql-tap/func.test.lua  | 12 ++++++------
 test/sql-tap/table.test.lua |  4 ++--
 test/sql/types.result       | 35 ++++++++++++++++++++++++++++++++++-
 test/sql/types.test.lua     | 11 +++++++++++
 12 files changed, 129 insertions(+), 17 deletions(-)

-- 
2.15.1

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

end of thread, other threads:[~2019-08-02 10:52 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-27 18:45 [tarantool-patches] [PATCH 0/2] Improve operability of typeof() function Nikita Pettik
2019-07-27 18:45 ` [tarantool-patches] [PATCH 1/2] sql: extend struct Mem with field_type member Nikita Pettik
2019-07-28 15:22   ` [tarantool-patches] " Vladislav Shpilevoy
2019-07-28 21:26     ` Konstantin Osipov
2019-07-31  9:14     ` n.pettik
2019-07-31 16:59       ` Vladislav Shpilevoy
2019-08-01 15:56         ` n.pettik
2019-08-01 23:11           ` Vladislav Shpilevoy
2019-08-02 10:02             ` n.pettik
2019-07-27 18:45 ` [tarantool-patches] [PATCH 2/2] sql: make default type of NULL be boolean Nikita Pettik
2019-08-02 10:52 ` [tarantool-patches] Re: [PATCH 0/2] Improve operability of typeof() function Kirill Yukhin

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