fix(query): set the correct flag when no neighbors exist.
This commit is contained in:
parent
d5b493677b
commit
114943ddb0
|
@ -2483,12 +2483,11 @@ static int32_t buildComposedDataBlock(STsdbReader* pReader) {
|
||||||
SBlockIndex bIndex = {0};
|
SBlockIndex bIndex = {0};
|
||||||
bool hasNeighbor = getNeighborBlockOfSameTable(pBlockInfo, pBlockScanInfo, &nextIndex, pReader->order, &bIndex);
|
bool hasNeighbor = getNeighborBlockOfSameTable(pBlockInfo, pBlockScanInfo, &nextIndex, pReader->order, &bIndex);
|
||||||
if (!hasNeighbor) { // do nothing
|
if (!hasNeighbor) { // do nothing
|
||||||
return 0;
|
setBlockAllDumped(pDumpInfo, pBlock->maxKey.ts, pReader->order);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool overlap = overlapWithNeighborBlock(pBlock, &bIndex, pReader->order);
|
if (overlapWithNeighborBlock(pBlock, &bIndex, pReader->order)) { // load next block
|
||||||
|
|
||||||
if (overlap) { // load next block
|
|
||||||
SReaderStatus* pStatus = &pReader->status;
|
SReaderStatus* pStatus = &pReader->status;
|
||||||
SDataBlockIter* pBlockIter = &pStatus->blockIter;
|
SDataBlockIter* pBlockIter = &pStatus->blockIter;
|
||||||
|
|
||||||
|
@ -2502,15 +2501,16 @@ static int32_t buildComposedDataBlock(STsdbReader* pReader) {
|
||||||
// 3. load the neighbor block, and set it to be the currently accessed file data block
|
// 3. load the neighbor block, and set it to be the currently accessed file data block
|
||||||
code = doLoadFileBlockData(pReader, pBlockIter, &pStatus->fileBlockData, pBlockInfo->uid);
|
code = doLoadFileBlockData(pReader, pBlockIter, &pStatus->fileBlockData, pBlockInfo->uid);
|
||||||
if (code != TSDB_CODE_SUCCESS) {
|
if (code != TSDB_CODE_SUCCESS) {
|
||||||
return code;
|
setBlockAllDumped(pDumpInfo, pBlock->maxKey.ts, pReader->order);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 4. check the data values
|
// 4. check the data values
|
||||||
initBlockDumpInfo(pReader, pBlockIter);
|
initBlockDumpInfo(pReader, pBlockIter);
|
||||||
|
} else {
|
||||||
|
setBlockAllDumped(pDumpInfo, pBlock->maxKey.ts, pReader->order);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
setBlockAllDumped(pDumpInfo, pBlock->maxKey.ts, pReader->order);
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue