未验证 提交 9cba8c40 编写于 作者: S Shengliang Guan 提交者: GitHub

Merge pull request #2769 from taosdata/feature/2.0tsdb

Feature/2.0tsdb
...@@ -1260,15 +1260,18 @@ static int tsdbLoadBlockDataColsImpl(SRWHelper *pHelper, SCompBlock *pCompBlock, ...@@ -1260,15 +1260,18 @@ static int tsdbLoadBlockDataColsImpl(SRWHelper *pHelper, SCompBlock *pCompBlock,
SCompCol *pCompCol = NULL; SCompCol *pCompCol = NULL;
while (true) { while (true) {
// ASSERT(dcol < pDataCols->numOfCols);
if (dcol >= pDataCols->numOfCols) { if (dcol >= pDataCols->numOfCols) {
pDataCol = NULL; pDataCol = NULL;
break; break;
} }
pDataCol = &pDataCols->cols[dcol]; pDataCol = &pDataCols->cols[dcol];
ASSERT(pDataCol->colId <= colId); if (pDataCol->colId > colId) {
if (pDataCol->colId == colId) break; pDataCol = NULL;
break;
} else {
dcol++; dcol++;
if (pDataCol->colId == colId) break;
}
} }
if (pDataCol == NULL) continue; if (pDataCol == NULL) continue;
...@@ -1281,15 +1284,24 @@ static int tsdbLoadBlockDataColsImpl(SRWHelper *pHelper, SCompBlock *pCompBlock, ...@@ -1281,15 +1284,24 @@ static int tsdbLoadBlockDataColsImpl(SRWHelper *pHelper, SCompBlock *pCompBlock,
compCol.offset = TSDB_KEY_COL_OFFSET; compCol.offset = TSDB_KEY_COL_OFFSET;
pCompCol = &compCol; pCompCol = &compCol;
} else { // load non-key rows } else { // load non-key rows
while (ccol < pCompBlock->numOfCols) { while (true) {
pCompCol = &pHelper->pCompData->cols[ccol]; if (ccol >= pCompBlock->numOfCols) {
if (pCompCol->colId >= colId) break; pCompCol = NULL;
break;
}
pCompCol = &(pHelper->pCompData->cols[ccol]);
if (pCompCol->colId > colId) {
pCompCol = NULL;
break;
} else {
ccol++; ccol++;
if (pCompCol->colId == colId) break;
}
} }
if (ccol >= pCompBlock->numOfCols || pCompCol->colId > colId) { if (pCompCol == NULL) {
dataColSetNEleNull(pDataCol, pCompBlock->numOfRows, pDataCols->maxPoints); dataColSetNEleNull(pDataCol, pCompBlock->numOfRows, pDataCols->maxPoints);
dcol++;
continue; continue;
} }
...@@ -1297,8 +1309,6 @@ static int tsdbLoadBlockDataColsImpl(SRWHelper *pHelper, SCompBlock *pCompBlock, ...@@ -1297,8 +1309,6 @@ static int tsdbLoadBlockDataColsImpl(SRWHelper *pHelper, SCompBlock *pCompBlock,
} }
if (tsdbLoadColData(pHelper, pFile, pCompBlock, pCompCol, pDataCol) < 0) goto _err; if (tsdbLoadColData(pHelper, pFile, pCompBlock, pCompCol, pDataCol) < 0) goto _err;
dcol++;
if (colId != 0) ccol++;
} }
return 0; return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册