提交 3570705e 编写于 作者: C Cary Xu

enh: add merge case to ci and code optimization

上级 ad60de54
...@@ -1732,6 +1732,7 @@ static int32_t mergeTwoRowFromMem(STsdbReadHandle* pTsdbReadHandle, int32_t capa ...@@ -1732,6 +1732,7 @@ static int32_t mergeTwoRowFromMem(STsdbReadHandle* pTsdbReadHandle, int32_t capa
if (*lastRowKey != TSKEY_INITIAL_VAL) { if (*lastRowKey != TSKEY_INITIAL_VAL) {
++(*curRow); ++(*curRow);
} }
*lastRowKey = rowKey;
++nResult; ++nResult;
} else if (update) { } else if (update) {
mergeOption = 2; mergeOption = 2;
...@@ -1739,8 +1740,6 @@ static int32_t mergeTwoRowFromMem(STsdbReadHandle* pTsdbReadHandle, int32_t capa ...@@ -1739,8 +1740,6 @@ static int32_t mergeTwoRowFromMem(STsdbReadHandle* pTsdbReadHandle, int32_t capa
mergeOption = 0; mergeOption = 0;
break; break;
} }
*lastRowKey = rowKey;
} }
} else { } else {
// TODO: use STSRowIter // TODO: use STSRowIter
...@@ -1753,6 +1752,7 @@ static int32_t mergeTwoRowFromMem(STsdbReadHandle* pTsdbReadHandle, int32_t capa ...@@ -1753,6 +1752,7 @@ static int32_t mergeTwoRowFromMem(STsdbReadHandle* pTsdbReadHandle, int32_t capa
if (*lastRowKey != TSKEY_INITIAL_VAL) { if (*lastRowKey != TSKEY_INITIAL_VAL) {
++(*curRow); ++(*curRow);
} }
*lastRowKey = rowKey;
++nResult; ++nResult;
} else if (update) { } else if (update) {
mergeOption = 2; mergeOption = 2;
...@@ -1760,7 +1760,6 @@ static int32_t mergeTwoRowFromMem(STsdbReadHandle* pTsdbReadHandle, int32_t capa ...@@ -1760,7 +1760,6 @@ static int32_t mergeTwoRowFromMem(STsdbReadHandle* pTsdbReadHandle, int32_t capa
mergeOption = 0; mergeOption = 0;
break; break;
} }
*lastRowKey = rowKey;
} else { } else {
SKvRowIdx* pColIdx = tdKvRowColIdxAt(row, chosen_itr - 1); SKvRowIdx* pColIdx = tdKvRowColIdxAt(row, chosen_itr - 1);
colId = pColIdx->colId; colId = pColIdx->colId;
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
./test.sh -f tsim/insert/backquote.sim ./test.sh -f tsim/insert/backquote.sim
./test.sh -f tsim/insert/null.sim ./test.sh -f tsim/insert/null.sim
./test.sh -f tsim/insert/update0.sim ./test.sh -f tsim/insert/update0.sim
./test.sh -f tsim/insert/commit-merge0.sim
# ---- parser # ---- parser
./test.sh -f tsim/parser/groupby-basic.sim ./test.sh -f tsim/parser/groupby-basic.sim
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册