fix: fix block scan issue

This commit is contained in:
dapan1121 2023-03-29 10:14:53 +08:00
parent 22ad3129b9
commit 702202d4af
1 changed files with 3 additions and 4 deletions

View File

@ -4496,17 +4496,16 @@ static int32_t doTsdbNextDataBlock(STsdbReader* pReader, bool *hasNext) {
return code;
}
if (pBlock->info.rows > 0) {
*hasNext = true;
} else {
if (pBlock->info.rows <= 0) {
resetTableListIndex(&pReader->status);
code = buildBlockFromBufferSequentially(pReader);
}
} else { // no data in files, let's try the buffer
code = buildBlockFromBufferSequentially(pReader);
*hasNext = pBlock->info.rows > 0;
}
*hasNext = pBlock->info.rows > 0;
return code;
}