fix(query): handle the case of the single block in last files.

This commit is contained in:
Haojun Liao 2022-10-27 21:51:54 +08:00
parent d06bcb2219
commit e7b59ae56d
1 changed files with 8 additions and 0 deletions

View File

@ -324,6 +324,14 @@ int32_t tLDataIterOpen(struct SLDataIter **pIter, SDataFReader *pReader, int32_t
taosArrayDestroy(pBlockLoadInfo->aSttBlk);
pBlockLoadInfo->aSttBlk = pTmp;
}
} else { // size == 1
SSttBlk *pStart = taosArrayGet(pBlockLoadInfo->aSttBlk, 0);
if (pStart->suid != suid) {
(*pIter)->iSttBlk = -1;
double el = (taosGetTimestampUs() - st) / 1000.0;
tsdbDebug("load the last file info completed, elapsed time:%.2fms, %s", el, idStr);
return code;
}
}
double el = (taosGetTimestampUs() - st) / 1000.0;