[patches] Re: [PATCH 1/3] sql: remove hidden column attribute

Kirill Yukhin kyukhin at tarantool.org
Thu Feb 22 16:22:56 MSK 2018


On 14 фев 15:38, Nikita Pettik wrote:
> As part of Tarantool data dictionary integration into SQL, all usages of
> colflag (i.e. field in struct Column) after space creation should be
> removed. Currently, colflag indicates one of three statuses:
> primary key column, hidden column and column with specified type.
> Since there is no more any hidden columns, this patch removes all
there're

> code connected with them.
to them

> 
> Part of #3118
> 
> Signed-off-by: Nikita Pettik <korablev at tarantool.org>
> ---
>  src/box/sql/build.c     | 17 -----------------
>  src/box/sql/delete.c    |  2 +-
>  src/box/sql/insert.c    | 35 +++++++----------------------------
>  src/box/sql/pragma.c    |  8 +-------
>  src/box/sql/select.c    | 14 --------------
>  src/box/sql/sqliteInt.h | 26 --------------------------
>  src/box/sql/whereexpr.c |  6 +-----
>  7 files changed, 10 insertions(+), 98 deletions(-)
> 
> diff --git a/src/box/sql/insert.c b/src/box/sql/insert.c
> index bc1906fb6..82a8c2c31 100644
> --- a/src/box/sql/insert.c
> +++ b/src/box/sql/insert.c
> @@ -739,16 +729,10 @@ sqlite3Insert(Parse * pParse,	/* Parser context */
>  		/* Compute data for all columns of the new entry, beginning
>  		 * with the first column.
>  		 */
> -		nHidden = 0;
>  		for (i = 0; i < pTab->nCol; i++) {
>  			int iRegStore = regTupleid + 1 + i;
>  			if (pColumn == 0) {
> -				if (IsHiddenColumn(&pTab->aCol[i])) {
> -					j = -1;
> -					nHidden++;
> -				} else {
> -					j = i - nHidden;
> -				}
> +				j = i;
Single line inside if stmt: no need for curly brace.


Otherwise, LGTM.

--
Thanks, Kirill



More information about the Tarantool-patches mailing list