From: Nikita Pettik <korablev@tarantool.org> To: tarantool-patches@freelists.org Cc: v.shpilevoy@tarantool.org, Nikita Pettik <korablev@tarantool.org> Subject: [tarantool-patches] [PATCH 0/2] Improve operability of typeof() function Date: Sat, 27 Jul 2019 21:45:34 +0300 [thread overview] Message-ID: <cover.1564247922.git.korablev@tarantool.org> (raw) 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
next reply other threads:[~2019-07-27 18:45 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-07-27 18:45 Nikita Pettik [this message] 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
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.1564247922.git.korablev@tarantool.org \ --to=korablev@tarantool.org \ --cc=tarantool-patches@freelists.org \ --cc=v.shpilevoy@tarantool.org \ --subject='Re: [tarantool-patches] [PATCH 0/2] Improve operability of typeof() function' \ /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