提交 482566ad 编写于 作者: C Cary Xu

code refactor

上级 6f75f15b
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
/** /**
* The fileset .head/.data/.last/.sma use the same TSDB_FS_VERSION. * The fileset .head/.data/.last/.sma use the same TSDB_FS_VERSION.
* 0 - original format before 2021.08.25 // TODO update date 2021.08.25 to release version. * 0 - original format before 2021.08.25 // TODO update date 2021.08.25 to release version.
* 1 - extract aggregation block data from .data file and save to separated .sma file since 2021.08.25 // TODO update * 1 - extract aggregate block data from .data file and save to separate .sma file since 2021.08.25 // TODO update
* date to release version. * date to release version.
*/ */
#define TSDB_FS_VERSION 1 #define TSDB_FS_VERSION 1
......
...@@ -44,7 +44,8 @@ typedef struct { ...@@ -44,7 +44,8 @@ typedef struct {
int32_t keyLen; // key column length, keyOffset = offset+sizeof(SBlockData)+sizeof(SBlockCol)*numOfCols int32_t keyLen; // key column length, keyOffset = offset+sizeof(SBlockData)+sizeof(SBlockCol)*numOfCols
#ifdef __TD_6117__ #ifdef __TD_6117__
int64_t hasAggr : 1; int64_t hasAggr : 1;
int64_t aggrOffset : 63; int64_t blkVer : 7;
int64_t aggrOffset : 56;
int32_t aggrLen; int32_t aggrLen;
#endif #endif
int16_t numOfSubBlocks; int16_t numOfSubBlocks;
...@@ -83,8 +84,8 @@ typedef struct { ...@@ -83,8 +84,8 @@ typedef struct {
int64_t sum; int64_t sum;
int64_t max; int64_t max;
int64_t min; int64_t min;
uint8_t type; // uint8_t type;
char reserved[15]; // Adjust the size of reserved array whenever adding new field of SAggrBlkCol. // char reserved[15]; // Adjust the size of reserved array whenever adding new field of SAggrBlkCol.
} SAggrBlkCol; } SAggrBlkCol;
// Code here just for back-ward compatibility // Code here just for back-ward compatibility
......
...@@ -1096,7 +1096,6 @@ int tsdbWriteBlockImpl(STsdbRepo *pRepo, STable *pTable, SDFile *pDFile, SDFile ...@@ -1096,7 +1096,6 @@ int tsdbWriteBlockImpl(STsdbRepo *pRepo, STable *pTable, SDFile *pDFile, SDFile
pBlockCol->type = pDataCol->type; pBlockCol->type = pDataCol->type;
pAggrBlkCol->colId = pDataCol->colId; pAggrBlkCol->colId = pDataCol->colId;
pAggrBlkCol->type = pDataCol->type;
if (tDataTypes[pDataCol->type].statisFunc) { if (tDataTypes[pDataCol->type].statisFunc) {
(*tDataTypes[pDataCol->type].statisFunc)(pDataCol->pData, rowsToWrite, &(pBlockCol->min), &(pBlockCol->max), (*tDataTypes[pDataCol->type].statisFunc)(pDataCol->pData, rowsToWrite, &(pBlockCol->min), &(pBlockCol->max),
......
...@@ -19,7 +19,7 @@ static const char *TSDB_FNAME_SUFFIX[] = { ...@@ -19,7 +19,7 @@ static const char *TSDB_FNAME_SUFFIX[] = {
"head", // TSDB_FILE_HEAD "head", // TSDB_FILE_HEAD
"data", // TSDB_FILE_DATA "data", // TSDB_FILE_DATA
"last", // TSDB_FILE_LAST "last", // TSDB_FILE_LAST
"sma", // TSDB_FILE_SMA(Small Materialized Aggregation) "sma", // TSDB_FILE_SMA(Small Materialized Aggregate)
"", // TSDB_FILE_MAX "", // TSDB_FILE_MAX
"meta", // TSDB_FILE_META "meta", // TSDB_FILE_META
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册