提交 4521970f 编写于 作者: L Liu Jicong

refactor: dataColSetNEleNull should not be used by other modules and be set to static

上级 1d3a2d47
......@@ -330,7 +330,6 @@ int tdAllocMemForCol(SDataCol *pCol, int maxPoints);
void dataColInit(SDataCol *pDataCol, STColumn *pCol, int maxPoints);
int dataColAppendVal(SDataCol *pCol, const void *value, int numOfRows, int maxPoints);
void dataColSetOffset(SDataCol *pCol, int nEle);
void dataColSetNEleNull(SDataCol *pCol, int nEle);
bool isNEleNull(SDataCol *pCol, int nEle);
......
......@@ -19,6 +19,7 @@
#include "wchar.h"
#include "tarray.h"
static void dataColSetNEleNull(SDataCol *pCol, int nEle);
static void tdMergeTwoDataCols(SDataCols *target, SDataCols *src1, int *iter1, int limit1, SDataCols *src2, int *iter2,
int limit2, int tRows, bool forceSetNull);
......@@ -297,7 +298,7 @@ static FORCE_INLINE void dataColSetNullAt(SDataCol *pCol, int index) {
}
}
void dataColSetNEleNull(SDataCol *pCol, int nEle) {
static void dataColSetNEleNull(SDataCol *pCol, int nEle) {
if (IS_VAR_DATA_TYPE(pCol->type)) {
pCol->len = 0;
for (int i = 0; i < nEle; i++) {
......
......@@ -920,7 +920,6 @@ int tsdbWriteBlockImpl(STsdbRepo *pRepo, STable *pTable, SDFile *pDFile, SDataCo
SDataCol * pDataCol = pDataCols->cols + ncol;
SBlockCol *pBlockCol = pBlockData->cols + nColsNotAllNull;
// if (isNEleNull(pDataCol, rowsToWrite)) { // all data to commit are NULL, just ignore it
if (isAllRowsNull(pDataCol)) { // all data to commit are NULL, just ignore it
continue;
}
......
......@@ -463,9 +463,6 @@ static int tsdbLoadBlockDataImpl(SReadH *pReadh, SBlock *pBlock, SDataCols *pDat
SDataCol *pDataCol = &(pDataCols->cols[dcol]);
if (dcol != 0 && ccol >= pBlockData->numOfCols) {
// Set current column as NULL and forward
// TODO: tdAllocMemForCol may fail
/*tdAllocMemForCol(pDataCol, pDataCols->maxPoints);*/
/*dataColSetNEleNull(pDataCol, pBlock->numOfRows);*/
dataColReset(pDataCol);
dcol++;
continue;
......@@ -506,9 +503,6 @@ static int tsdbLoadBlockDataImpl(SReadH *pReadh, SBlock *pBlock, SDataCols *pDat
ccol++;
} else {
// Set current column as NULL and forward
// TODO: tdAllocMemForCol may fail
/*tdAllocMemForCol(pDataCol, pDataCols->maxPoints);*/
/*dataColSetNEleNull(pDataCol, pBlock->numOfRows);*/
dataColReset(pDataCol);
dcol++;
}
......@@ -614,9 +608,6 @@ static int tsdbLoadBlockDataColsImpl(SReadH *pReadh, SBlock *pBlock, SDataCols *
}
if (pBlockCol == NULL) {
// TODO: tdAllocMemForCol may fail
/*tdAllocMemForCol(pDataCol, pDataCols->maxPoints);*/
/*dataColSetNEleNull(pDataCol, pBlock->numOfRows);*/
dataColReset(pDataCol);
continue;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册