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 876E7251A2 for ; Fri, 18 May 2018 11:26:31 -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 UhWI2TLz47KX for ; Fri, 18 May 2018 11:26:31 -0400 (EDT) Received: from smtpng2.m.smailru.net (smtpng2.m.smailru.net [94.100.179.3]) (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 40EFC24EEB for ; Fri, 18 May 2018 11:26:30 -0400 (EDT) Subject: [tarantool-patches] Re: [PATCH v6 3/4] sql: space_def* instead of Table* in Expr References: <6702e8ecd47238730a4ba27e87fe7bf082a874c6.1526403792.git.kshcherbatov@tarantool.org> <26E4269B-2BCB-42C3-8216-D51E290E4723@corp.mail.ru> From: Kirill Shcherbatov Message-ID: <23e5e1f9-3700-26b4-c974-1b0379dc9bcb@tarantool.org> Date: Fri, 18 May 2018 18:26:28 +0300 MIME-Version: 1.0 In-Reply-To: <26E4269B-2BCB-42C3-8216-D51E290E4723@corp.mail.ru> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 8bit 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: "n.pettik@corp.mail.ru" , tarantool-patches@freelists.org Cc: Vladislav Shpilevoy > Probably, you have missed some word (‘use’, ‘replace’ or whatever) > > Sorry, but I can’t parse this commit message. Lets dive a little bit into details > and explain what this patch *really* does. Such as: > “Move affinity filed to struct field in order to bla-bla”. > > The rest is almost okay, a few minor remarks. ``` sql: space_def* instead of Table* in Expr Changed Table pointer to space_def in Expr structure. This makes able to resolve self reference in DDL before the table object is created. Part of #3272. ``` > I would better use enum affinity_type than char. @@ -1468,7 +1468,7 @@ int tarantoolSqlite3MakeTableFormat(Table *pTable, void *buf) - char affinity = def->fields[i].affinity; + enum affinity_type affinity = def->fields[i].affinity; @@ -1594,7 +1594,7 @@ int tarantoolSqlite3MakeIdxParts(SqliteIndex *pIndex, void *buf) - char affinity = def->fields[col].affinity; + enum affinity_type affinity = def->fields[col].affinity; @@ -1801,8 +1801,10 @@ xferOptimization(Parse * pParse, /* Parser context */ - char pdest_affinity = pDest->def->fields[i].affinity; - char psrc_affinity = pSrc->def->fields[i].affinity; + enum affinity_type pdest_affinity = + pDest->def->fields[i].affinity; + enum affinity_type psrc_affinity = + pSrc->def->fields[i].affinity; > If tab1 is what? - /* The tab2 must be NOT NULL if tab1 is */ Invalid with introducing is_nullable. > Wait, why did you delete assert which had been introduced in the previous patch? Because I've changed func. prototype.