fix(tsdb): fix bug for filter brin record.

This commit is contained in:
Haojun Liao 2024-03-26 10:55:56 +08:00
parent cedca30416
commit 52a04cd008
1 changed files with 8 additions and 3 deletions

View File

@ -709,9 +709,14 @@ static int32_t doLoadFileBlock(STsdbReader* pReader, SArray* pIndexList, SBlockN
continue; continue;
} }
int32_t ret = pkCompEx(pReader->pkComparFn, &pRecord->lastKey.key, &pScanInfo->lastProcKey); if (asc) {
if ((asc && ret <= 0) || (!asc && ret >= 0)) { if (pkCompEx(pReader->pkComparFn, &pRecord->lastKey.key, &pScanInfo->lastProcKey) <= 0) {
continue; continue;
}
} else {
if (pkCompEx(pReader->pkComparFn, &pRecord->firstKey.key, &pScanInfo->lastProcKey) >= 0) {
continue;
}
} }
// 2. version range check, version range is an CLOSED interval // 2. version range check, version range is an CLOSED interval