提交 521283b2 编写于 作者: A Alex Duan

fix(query): need not load block if window include block completely

上级 828ad921
...@@ -3047,6 +3047,11 @@ static bool overlapWithTimeWindow(SQueryAttr* pQueryAttr, SDataBlockInfo* pBlock ...@@ -3047,6 +3047,11 @@ static bool overlapWithTimeWindow(SQueryAttr* pQueryAttr, SDataBlockInfo* pBlock
ekey = taosTimeAdd(ekey, pQueryAttr->interval.sliding, pQueryAttr->interval.slidingUnit, pQueryAttr->precision); ekey = taosTimeAdd(ekey, pQueryAttr->interval.sliding, pQueryAttr->interval.slidingUnit, pQueryAttr->precision);
else else
ekey += pQueryAttr->interval.sliding; ekey += pQueryAttr->interval.sliding;
// not in range sk~ek, break
if (!(ekey >= sk && ekey <= ek)) {
break;
}
// get align // get align
getAlignQueryTimeWindow(pQueryAttr, ekey, sk, ek, &w); getAlignQueryTimeWindow(pQueryAttr, ekey, sk, ek, &w);
} }
...@@ -3056,7 +3061,7 @@ static bool overlapWithTimeWindow(SQueryAttr* pQueryAttr, SDataBlockInfo* pBlock ...@@ -3056,7 +3061,7 @@ static bool overlapWithTimeWindow(SQueryAttr* pQueryAttr, SDataBlockInfo* pBlock
break; break;
} }
// window start point in block window ragne return true // window start point in block window range return true
if (w.skey >= pBlockInfo->window.skey && w.skey <= pBlockInfo->window.ekey) { if (w.skey >= pBlockInfo->window.skey && w.skey <= pBlockInfo->window.ekey) {
return true; return true;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册