enh: use int32_t as schema version
This commit is contained in:
parent
d6bd729888
commit
044122bd3b
|
@ -30,7 +30,7 @@ typedef uint64_t TDRowVerT;
|
||||||
typedef int16_t col_id_t;
|
typedef int16_t col_id_t;
|
||||||
typedef int8_t col_type_t;
|
typedef int8_t col_type_t;
|
||||||
typedef int32_t col_bytes_t;
|
typedef int32_t col_bytes_t;
|
||||||
typedef uint16_t schema_ver_t;
|
typedef int32_t schema_ver_t;
|
||||||
typedef int32_t func_id_t;
|
typedef int32_t func_id_t;
|
||||||
|
|
||||||
#pragma pack(push, 1)
|
#pragma pack(push, 1)
|
||||||
|
|
|
@ -278,13 +278,12 @@ STSchema *metaGetTbTSchema(SMeta *pMeta, tb_uid_t uid, int32_t sver) {
|
||||||
pSW = metaGetTableSchema(pMeta, quid, sver, 0);
|
pSW = metaGetTableSchema(pMeta, quid, sver, 0);
|
||||||
if (!pSW) return NULL;
|
if (!pSW) return NULL;
|
||||||
|
|
||||||
tdInitTSchemaBuilder(&sb, 0);
|
tdInitTSchemaBuilder(&sb, sver);
|
||||||
for (int i = 0; i < pSW->nCols; i++) {
|
for (int i = 0; i < pSW->nCols; i++) {
|
||||||
pSchema = pSW->pSchema + i;
|
pSchema = pSW->pSchema + i;
|
||||||
tdAddColToSchema(&sb, pSchema->type, pSchema->flags, pSchema->colId, pSchema->bytes);
|
tdAddColToSchema(&sb, pSchema->type, pSchema->flags, pSchema->colId, pSchema->bytes);
|
||||||
}
|
}
|
||||||
pTSchema = tdGetSchemaFromBuilder(&sb);
|
pTSchema = tdGetSchemaFromBuilder(&sb);
|
||||||
pTSchema->version = sver;
|
|
||||||
|
|
||||||
tdDestroyTSchemaBuilder(&sb);
|
tdDestroyTSchemaBuilder(&sb);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue