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

code refactor

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