提交 3b00de6d 编写于 作者: H Hongze Cheng

Merge branch 'feat/tsdb_refact' of https://github.com/taosdata/TDengine into feat/tsdb_snapshot

...@@ -1190,16 +1190,12 @@ void tBlockDataGetColData(SBlockData *pBlockData, int16_t cid, SColData **ppColD ...@@ -1190,16 +1190,12 @@ void tBlockDataGetColData(SBlockData *pBlockData, int16_t cid, SColData **ppColD
ASSERT(cid != PRIMARYKEY_TIMESTAMP_COL_ID); ASSERT(cid != PRIMARYKEY_TIMESTAMP_COL_ID);
int32_t lidx = 0; int32_t lidx = 0;
int32_t ridx = taosArrayGetSize(pBlockData->aIdx) - 1; int32_t ridx = taosArrayGetSize(pBlockData->aIdx) - 1;
int32_t midx;
while (lidx <= ridx) { while (lidx <= ridx) {
SColData *pColData; int32_t midx = (lidx + ridx) / 2;
int32_t c; SColData *pColData = tBlockDataGetColDataByIdx(pBlockData, midx);
int32_t c = tColDataCmprFn(pColData, &(SColData){.cid = cid});
midx = (lidx + midx) / 2;
pColData = tBlockDataGetColDataByIdx(pBlockData, midx);
c = tColDataCmprFn(pColData, &(SColData){.cid = cid});
if (c == 0) { if (c == 0) {
*ppColData = pColData; *ppColData = pColData;
return; return;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册