fix(query): check for 0 tables in tsdbreader

This commit is contained in:
Haojun Liao 2022-12-03 23:52:38 +08:00
parent 803762c4e0
commit fca20668f5
1 changed files with 3 additions and 2 deletions

View File

@ -3960,6 +3960,9 @@ static bool doTsdbNextDataBlock(STsdbReader* pReader) {
blockDataCleanup(pBlock);
SReaderStatus* pStatus = &pReader->status;
if (taosHashGetSize(pStatus->pTableMap) == 0){
return false;
}
if (pStatus->loadFromFile) {
int32_t code = buildBlockFromFiles(pReader);
@ -3977,8 +3980,6 @@ static bool doTsdbNextDataBlock(STsdbReader* pReader) {
buildBlockFromBufferSequentially(pReader);
return pBlock->info.rows > 0;
}
return false;
}
bool tsdbNextDataBlock(STsdbReader* pReader) {