enh: optimize last pruning logic

This commit is contained in:
Xiaoyu Wang 2023-03-19 14:40:16 +08:00
parent 6277b2564b
commit f86c8d0d6e
1 changed files with 1 additions and 1 deletions

View File

@ -408,7 +408,7 @@ int32_t tsdbRetrieveCacheRows(void* pReader, SSDataBlock* pResBlock, const int32
}
if (hasNotNullRow) {
if (INT64_MAX == totalLastTs || totalLastTs < singleTableLastTs) {
if (INT64_MAX == totalLastTs || (INT64_MAX != singleTableLastTs && totalLastTs < singleTableLastTs)) {
totalLastTs = singleTableLastTs;
}
double cost = (taosGetTimestampUs() - st) / 1000.0;