提交 18c92c1c 编写于 作者: T Tao Liu

[TD-188] adjust format and remove some unnecessary code

上级 dd70c178
...@@ -37,7 +37,6 @@ void *tdEncodeSchema(void *dst, STSchema *pSchema) { ...@@ -37,7 +37,6 @@ void *tdEncodeSchema(void *dst, STSchema *pSchema) {
T_APPEND_MEMBER(dst, pSchema, STSchema, version); T_APPEND_MEMBER(dst, pSchema, STSchema, version);
T_APPEND_MEMBER(dst, pSchema, STSchema, numOfCols); T_APPEND_MEMBER(dst, pSchema, STSchema, numOfCols);
T_APPEND_MEMBER(dst, pSchema, STSchema, vlen);
for (int i = 0; i < schemaNCols(pSchema); i++) { for (int i = 0; i < schemaNCols(pSchema); i++) {
STColumn *pCol = schemaColAt(pSchema, i); STColumn *pCol = schemaColAt(pSchema, i);
T_APPEND_MEMBER(dst, pCol, STColumn, type); T_APPEND_MEMBER(dst, pCol, STColumn, type);
...@@ -54,12 +53,10 @@ void *tdEncodeSchema(void *dst, STSchema *pSchema) { ...@@ -54,12 +53,10 @@ void *tdEncodeSchema(void *dst, STSchema *pSchema) {
STSchema *tdDecodeSchema(void **psrc) { STSchema *tdDecodeSchema(void **psrc) {
int totalCols = 0; int totalCols = 0;
int version = 0; int version = 0;
int16_t vlen = 0;
STSchemaBuilder schemaBuilder = {0}; STSchemaBuilder schemaBuilder = {0};
T_READ_MEMBER(*psrc, int, version); T_READ_MEMBER(*psrc, int, version);
T_READ_MEMBER(*psrc, int, totalCols); T_READ_MEMBER(*psrc, int, totalCols);
T_READ_MEMBER(*psrc, int16_t, vlen);
if (tdInitTSchemaBuilder(&schemaBuilder, version) < 0) return NULL; if (tdInitTSchemaBuilder(&schemaBuilder, version) < 0) return NULL;
...@@ -78,7 +75,6 @@ STSchema *tdDecodeSchema(void **psrc) { ...@@ -78,7 +75,6 @@ STSchema *tdDecodeSchema(void **psrc) {
} }
STSchema *pSchema = tdGetSchemaFromBuilder(&schemaBuilder); STSchema *pSchema = tdGetSchemaFromBuilder(&schemaBuilder);
pSchema->vlen = vlen;
tdDestroyTSchemaBuilder(&schemaBuilder); tdDestroyTSchemaBuilder(&schemaBuilder);
return pSchema; return pSchema;
} }
......
...@@ -67,10 +67,10 @@ typedef struct { ...@@ -67,10 +67,10 @@ typedef struct {
// --------- TSDB REPOSITORY USAGE STATISTICS // --------- TSDB REPOSITORY USAGE STATISTICS
typedef struct { typedef struct {
int64_t totalStorage; //total bytes occupie int64_t totalStorage; // total bytes occupie
int64_t compStorage; int64_t compStorage;
int64_t pointsWritten; //total data points written int64_t pointsWritten; // total data points written
}STsdbStat; } STsdbStat;
typedef void TsdbRepoT; // use void to hide implementation details from outside typedef void TsdbRepoT; // use void to hide implementation details from outside
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册