[tarantool-patches] Re: [PATCH v6 3/4] sql: space_def* instead of Table* in Expr
Kirill Shcherbatov
kshcherbatov at tarantool.org
Fri May 18 18:26:28 MSK 2018
> 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.
More information about the Tarantool-patches
mailing list