fix(query): fix error in check if load block is needed

This commit is contained in:
Haojun Liao 2022-12-12 13:07:30 +08:00
parent dc9c5e769e
commit 4b5f4e5175
1 changed files with 5 additions and 5 deletions

View File

@ -110,9 +110,9 @@ static bool overlapWithTimeWindow(SInterval* pInterval, SDataBlockInfo* pBlockIn
if (order == TSDB_ORDER_ASC) { if (order == TSDB_ORDER_ASC) {
w = getAlignQueryTimeWindow(pInterval, pInterval->precision, pBlockInfo->window.skey); w = getAlignQueryTimeWindow(pInterval, pInterval->precision, pBlockInfo->window.skey);
assert(w.ekey >= pBlockInfo->window.skey); ASSERT(w.ekey >= pBlockInfo->window.skey);
if (TMAX(w.skey, pBlockInfo->window.skey) <= TMIN(w.ekey, pBlockInfo->window.ekey)) { if (w.ekey < pBlockInfo->window.ekey) {
return true; return true;
} }
@ -122,16 +122,16 @@ static bool overlapWithTimeWindow(SInterval* pInterval, SDataBlockInfo* pBlockIn
break; break;
} }
assert(w.ekey > pBlockInfo->window.ekey); ASSERT(w.ekey > pBlockInfo->window.ekey);
if (TMAX(w.skey, pBlockInfo->window.skey) <= pBlockInfo->window.ekey) { if (TMAX(w.skey, pBlockInfo->window.skey) <= pBlockInfo->window.ekey) {
return true; return true;
} }
} }
} else { } else {
w = getAlignQueryTimeWindow(pInterval, pInterval->precision, pBlockInfo->window.ekey); w = getAlignQueryTimeWindow(pInterval, pInterval->precision, pBlockInfo->window.ekey);
assert(w.skey <= pBlockInfo->window.ekey); ASSERT(w.skey <= pBlockInfo->window.ekey);
if (TMAX(w.skey, pBlockInfo->window.skey) <= TMIN(w.ekey, pBlockInfo->window.ekey)) { if (w.skey > pBlockInfo->window.skey) {
return true; return true;
} }