fix(tsdb): fix invalid empty time window check.
This commit is contained in:
parent
6127185e3b
commit
cf30db8795
|
@ -419,6 +419,8 @@ static int32_t loadSttStatisticsBlockData(SSttFileReader *pSttFileReader, SSttBl
|
||||||
tValueDupPayload(&vLast);
|
tValueDupPayload(&vLast);
|
||||||
taosArrayPush(pBlockLoadInfo->info.pLastKey, &vLast);
|
taosArrayPush(pBlockLoadInfo->info.pLastKey, &vLast);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ASSERT(taosArrayGetSize(pBlockLoadInfo->info.pLastKey) == taosArrayGetSize(pBlockLoadInfo->info.pFirstTs));
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
@ -450,6 +452,8 @@ static int32_t loadSttStatisticsBlockData(SSttFileReader *pSttFileReader, SSttBl
|
||||||
|
|
||||||
i += 1;
|
i += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ASSERT(taosArrayGetSize(pBlockLoadInfo->info.pLastKey) == taosArrayGetSize(pBlockLoadInfo->info.pFirstTs));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -728,7 +728,7 @@ static int32_t loadFileBlockBrinInfo(STsdbReader* pReader, SArray* pIndexList, S
|
||||||
|
|
||||||
STableBlockScanInfo* pScanInfo = getTableBlockScanInfo(pReader->status.pTableMap, uid, pReader->idStr);
|
STableBlockScanInfo* pScanInfo = getTableBlockScanInfo(pReader->status.pTableMap, uid, pReader->idStr);
|
||||||
|
|
||||||
// todo: here we should find the first timestamp that is greater than the lastProcKey
|
// here we should find the first timestamp that is greater than the lastProcKey
|
||||||
// the window is an open interval NOW.
|
// the window is an open interval NOW.
|
||||||
if (asc) {
|
if (asc) {
|
||||||
w.skey = pScanInfo->lastProcKey.ts;
|
w.skey = pScanInfo->lastProcKey.ts;
|
||||||
|
@ -736,9 +736,9 @@ static int32_t loadFileBlockBrinInfo(STsdbReader* pReader, SArray* pIndexList, S
|
||||||
w.ekey = pScanInfo->lastProcKey.ts;
|
w.ekey = pScanInfo->lastProcKey.ts;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (/*isEmptyQueryTimeWindow(&w)*/ w.ekey - w.skey < 1) { // NOTE: specialized for open interval
|
// NOTE: specialized for open interval
|
||||||
|
if (((w.skey < INT64_MAX) && ((w.skey + 1) > w.ekey)) || (w.skey == INT64_MAX)) {
|
||||||
k += 1;
|
k += 1;
|
||||||
|
|
||||||
if (k >= numOfTables) {
|
if (k >= numOfTables) {
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue