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 8BD9A2A8CA for ; Thu, 21 Mar 2019 05:03:36 -0400 (EDT) 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 AfqO9VaUBzvO for ; Thu, 21 Mar 2019 05:03:36 -0400 (EDT) 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 AE58029FF0 for ; Thu, 21 Mar 2019 05:03:35 -0400 (EDT) Subject: [tarantool-patches] Re: [PATCH 1/2] sql: make type in column-meta be consistent with NoSQL names References: <2bb818aa4a68f456c5460cdaa3a519bd1bb57e2f.1552327461.git.korablev@tarantool.org> From: Vladislav Shpilevoy Message-ID: Date: Thu, 21 Mar 2019 12:03:32 +0300 MIME-Version: 1.0 In-Reply-To: <2bb818aa4a68f456c5460cdaa3a519bd1bb57e2f.1552327461.git.korablev@tarantool.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit 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, Nikita Pettik Hi! Thanks for the patch! See 2 comments below. On 11/03/2019 21:10, Nikita Pettik wrote: > Column meta-information which is sent alongside execution result via > IProto protocol, contains string representation of column type. > In some cases, name of type is different from actual type of field. For > instance, if column has type SCALAR, string representation in > meta-information will be "BLOB"; for NUMBER NoSQL type - it will be > "NUMERIC"; for STRING - "TEXT". Instead of this mess, let's always return > exact name of underlying NoSQL type. 1. As I know, Kostja deliberately kept SQL names different from NoSQL names, because SQL has strict standard typing != Tarantool one's. Please, ask him if your renaming is ok. > --- > src/box/sql/select.c | 31 ++----------- > test/sql/errinj.result | 2 +- > test/sql/gh-2362-select-access-rights.result | 4 +- > test/sql/iproto.result | 68 ++++++++++++++-------------- > 4 files changed, 41 insertions(+), 64 deletions(-) > > diff --git a/test/sql/errinj.result b/test/sql/errinj.result > index 0f6075b13..6763faf63 100644 > --- a/test/sql/errinj.result > +++ b/test/sql/errinj.result > @@ -115,7 +115,7 @@ select_res > --- > - metadata: > - name: '1' > - type: INTEGER > + type: integer 2. Not sure, if lowcase is ok. As I know, all SQL identifiers, keywords should be stored and returned in uppercase (according to what I heard from the one, who did the patch for uppercasing everything). Please, consult Kostja, and check out other vendors for that.