提交 c3d05664 编写于 作者: S Shengliang Guan

Merge remote-tracking branch 'origin/develop' into feature/vnode

...@@ -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;
dcol++; break;
} else {
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;
ccol++; break;
}
pCompCol = &(pHelper->pCompData->cols[ccol]);
if (pCompCol->colId > colId) {
pCompCol = NULL;
break;
} else {
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.
先完成此消息的编辑!
想要评论请 注册