From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id A3ED02424F for ; Thu, 7 Mar 2019 09:00:07 -0500 (EST) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Tk6Bt8Jcf-Uz for ; Thu, 7 Mar 2019 09:00:07 -0500 (EST) Received: from smtpng3.m.smailru.net (smtpng3.m.smailru.net [94.100.177.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 5ABE124216 for ; Thu, 7 Mar 2019 09:00:07 -0500 (EST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.2 \(3445.102.3\)) Subject: [tarantool-patches] Re: [PATCH 4/4] sql: replace BLOB as column type with SCALAR From: "n.pettik" In-Reply-To: <20190307134039.GF24636@chai> Date: Thu, 7 Mar 2019 17:00:04 +0300 Content-Transfer-Encoding: quoted-printable Message-Id: <7BD755F7-2C39-499F-AE63-94DAECF1ED80@tarantool.org> References: <83426c95235d880a4d16ca84927138961caf3c55.1551964360.git.korablev@tarantool.org> <20190307134039.GF24636@chai> Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-Help: List-Unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-Subscribe: List-Owner: List-post: List-Archive: To: tarantool-patches@freelists.org Cc: Konstantin Osipov , Kirill Yukhin > On 7 Mar 2019, at 16:40, Konstantin Osipov = wrote: >=20 > * Nikita Pettik [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. >>=20 >=20 > 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[] =3D { { "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 =3D require("sqltester") -test:plan(175) +test:plan(176) =20 --!./tcltestrunner.lua -- 2009 January 29 @@ -54,6 +54,7 @@ local bannedkws =3D { "asc", "begin", "between", + "blob", "by", "case", "check", >=20 > 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=E2=80=99ve rebased patch (after rebase on fresh 2.1 some new = tests failed due to usage of CHAR instead of VARCHAR). > --=20 > Konstantin Osipov, Moscow, Russia, +7 903 626 22 32 > http://tarantool.io - www.twitter.com/kostja_osipov