提交 df889d75 编写于 作者: H Haojun Liao

fix(query): set correct seek position.

上级 93f9ffe0
...@@ -593,22 +593,22 @@ static void tsBufGetBlock(STSBuf* pTSBuf, int32_t groupIndex, int32_t blockIndex ...@@ -593,22 +593,22 @@ static void tsBufGetBlock(STSBuf* pTSBuf, int32_t groupIndex, int32_t blockIndex
} }
STSCursor* pCur = &pTSBuf->cur; STSCursor* pCur = &pTSBuf->cur;
if (pCur->vgroupIndex == groupIndex && ((pCur->blockIndex <= blockIndex && pCur->order == TSDB_ORDER_ASC) || // if (pCur->vgroupIndex == groupIndex && ((pCur->blockIndex <= blockIndex && pCur->order == TSDB_ORDER_ASC) ||
(pCur->blockIndex >= blockIndex && pCur->order == TSDB_ORDER_DESC))) { // (pCur->blockIndex >= blockIndex && pCur->order == TSDB_ORDER_DESC))) {
int32_t i = 0; // int32_t i = 0;
bool decomp = false; // bool decomp = false;
int32_t step = abs(blockIndex - pCur->blockIndex); // int32_t step = abs(blockIndex - pCur->blockIndex);
//
while ((++i) <= step) { // while ((++i) <= step) {
if (readDataFromDisk(pTSBuf, pCur->order, decomp) == NULL) { // if (readDataFromDisk(pTSBuf, pCur->order, decomp) == NULL) {
return; // return;
} // }
} // }
} else { // } else {
if (tsBufFindBlock(pTSBuf, pBlockInfo, blockIndex) == -1) { if (tsBufFindBlock(pTSBuf, pBlockInfo, blockIndex) == -1) {
assert(false); assert(false);
} }
} // }
STSBlock* pBlock = &pTSBuf->block; STSBlock* pBlock = &pTSBuf->block;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册