fix(query): fix the last block check condition.
This commit is contained in:
parent
20b06a7ec7
commit
370b5136c2
|
@ -1416,7 +1416,7 @@ static int32_t doMergeBufAndFileRows_Rv(STsdbReader* pReader, STableBlockScanInf
|
|||
int64_t minKey = 0;
|
||||
if (pReader->order == TSDB_ORDER_ASC) {
|
||||
minKey = INT64_MAX; // chosen the minimum value
|
||||
if (minKey > tsLast && pLastBlockReader->lastBlockData.nRow > 0) {
|
||||
if (minKey > tsLast && hasDataInLastBlock(pLastBlockReader)) {
|
||||
minKey = tsLast;
|
||||
}
|
||||
|
||||
|
@ -1429,7 +1429,7 @@ static int32_t doMergeBufAndFileRows_Rv(STsdbReader* pReader, STableBlockScanInf
|
|||
}
|
||||
} else {
|
||||
minKey = INT64_MIN;
|
||||
if (minKey < tsLast && pLastBlockReader->lastBlockData.nRow > 0) {
|
||||
if (minKey < tsLast && hasDataInLastBlock(pLastBlockReader)) {
|
||||
minKey = tsLast;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue