From: "n.pettik" <korablev@tarantool.org> To: tarantool-patches@freelists.org Cc: Konstantin Osipov <kostja@tarantool.org>, Kirill Yukhin <kyukhin@tarantool.org> Subject: [tarantool-patches] Re: [PATCH 4/4] sql: replace BLOB as column type with SCALAR Date: Thu, 7 Mar 2019 17:00:04 +0300 [thread overview] Message-ID: <7BD755F7-2C39-499F-AE63-94DAECF1ED80@tarantool.org> (raw) In-Reply-To: <20190307134039.GF24636@chai> > On 7 Mar 2019, at 16:40, Konstantin Osipov <kostja@tarantool.org> wrote: > > * Nikita Pettik <korablev@tarantool.org> [19/03/07 16:18]: >> BLOB column type is represented by SCALAR field type in terms of NoSQL. >> We attempted at emulating BLOB behaviour, but such efforts turn out to >> be not decent enough. For this reason, we've decided to abandon these >> attempts and fairly replace it with SCALAR column type. SCALAR column >> type acts in the same way as it does in NoSQL: it is aggregator-type for >> INTEGER, NUMBER and STRING types. So, column declared with this type can >> contain values of these three (available in SQL) types. It is worth >> mentioning that CAST operator in this case does nothing. >> > > Shouldn't we keep the BLOB keyword in the list of reserved words? Yep, surely we should. Fixed: diff --git a/extra/mkkeywordhash.c b/extra/mkkeywordhash.c index 0a874c8e6..fbd56fa00 100644 --- a/extra/mkkeywordhash.c +++ b/extra/mkkeywordhash.c @@ -213,6 +213,7 @@ static Keyword aKeywordTable[] = { { "WHERE", "TK_WHERE", ALWAYS, true }, { "ANY", "TK_STANDARD", RESERVED, true }, { "ASENSITIVE", "TK_STANDARD", RESERVED, true }, + { "BLOB", "TK_STANDARD", RESERVED, true }, { "BINARY", "TK_ID", RESERVED, true }, { "CALL", "TK_STANDARD", RESERVED, true }, { "CHAR", "TK_CHAR", RESERVED, true }, diff --git a/test/sql-tap/keyword1.test.lua b/test/sql-tap/keyword1.test.lua index 6895dc16e..44fa1cfb5 100755 --- a/test/sql-tap/keyword1.test.lua +++ b/test/sql-tap/keyword1.test.lua @@ -1,6 +1,6 @@ #!/usr/bin/env tarantool test = require("sqltester") -test:plan(175) +test:plan(176) --!./tcltestrunner.lua -- 2009 January 29 @@ -54,6 +54,7 @@ local bannedkws = { "asc", "begin", "between", + "blob", "by", "case", "check", > > The same applies to DATE/TIME and other words which are reserved > in SQL standard. These words are already reserved. > The patch itself LGTM. Also, I’ve rebased patch (after rebase on fresh 2.1 some new tests failed due to usage of CHAR instead of VARCHAR). > -- > Konstantin Osipov, Moscow, Russia, +7 903 626 22 32 > http://tarantool.io - www.twitter.com/kostja_osipov
next prev parent reply other threads:[~2019-03-07 14:00 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-03-07 13:14 [tarantool-patches] [PATCH 0/4] SQL types changes Nikita Pettik 2019-03-07 13:14 ` [tarantool-patches] [PATCH 1/4] sql: remove support of DATE/TIME from parser Nikita Pettik 2019-03-07 13:34 ` [tarantool-patches] " Konstantin Osipov 2019-03-07 13:14 ` [tarantool-patches] [PATCH 2/4] sql: remove support of CHAR type " Nikita Pettik 2019-03-07 13:35 ` [tarantool-patches] " Konstantin Osipov 2019-03-07 13:14 ` [tarantool-patches] [PATCH 3/4] sql: remove support of NUMERIC " Nikita Pettik 2019-03-07 13:36 ` [tarantool-patches] " Konstantin Osipov 2019-03-07 13:14 ` [tarantool-patches] [PATCH 4/4] sql: replace BLOB as column type with SCALAR Nikita Pettik 2019-03-07 13:40 ` [tarantool-patches] " Konstantin Osipov 2019-03-07 14:00 ` n.pettik [this message] 2019-03-07 14:14 ` [tarantool-patches] Re: [PATCH 0/4] SQL types changes 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=7BD755F7-2C39-499F-AE63-94DAECF1ED80@tarantool.org \ --to=korablev@tarantool.org \ --cc=kostja@tarantool.org \ --cc=kyukhin@tarantool.org \ --cc=tarantool-patches@freelists.org \ --subject='[tarantool-patches] Re: [PATCH 4/4] sql: replace BLOB as column type with SCALAR' \ /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