提交 b1a429f7 编写于 作者: C Cary Xu

feat: code optimization for update

上级 1fa906cd
...@@ -670,7 +670,7 @@ int tdMergeDataCols(SDataCols *target, SDataCols *source, int rowsToMerge, int * ...@@ -670,7 +670,7 @@ int tdMergeDataCols(SDataCols *target, SDataCols *source, int rowsToMerge, int *
} }
} }
} }
if (rowsToMerge > 0) { if (lastKey != TSKEY_INITIAL_VAL) {
++target->numOfRows; ++target->numOfRows;
} }
(*pOffset) += rowsToMerge; (*pOffset) += rowsToMerge;
...@@ -778,7 +778,7 @@ static void tdMergeTwoDataCols(SDataCols *target, SDataCols *src1, int *iter1, i ...@@ -778,7 +778,7 @@ static void tdMergeTwoDataCols(SDataCols *target, SDataCols *src1, int *iter1, i
ASSERT(target->numOfRows <= target->maxPoints - 1); ASSERT(target->numOfRows <= target->maxPoints - 1);
} }
if (nRows > 0) { if (lastKey != TSKEY_INITIAL_VAL) {
++target->numOfRows; ++target->numOfRows;
} }
} }
......
...@@ -816,9 +816,10 @@ static TSKEY extractFirstTraverseKey(STableCheckInfo* pCheckInfo, int32_t order, ...@@ -816,9 +816,10 @@ static TSKEY extractFirstTraverseKey(STableCheckInfo* pCheckInfo, int32_t order,
SSkipListNode* node = tSkipListIterGet(pCheckInfo->iter); SSkipListNode* node = tSkipListIterGet(pCheckInfo->iter);
if (node != NULL) { if (node != NULL) {
rmem = (STSRow*)SL_GET_NODE_DATA(node); rmem = (STSRow*)SL_GET_NODE_DATA(node);
if (TD_ROW_KEY(rmem) > maxVer) { // TODO: filter max version
rmem = NULL; // if (TD_ROW_VER(rmem) > maxVer) {
} // rmem = NULL;
// }
} }
} }
...@@ -826,9 +827,10 @@ static TSKEY extractFirstTraverseKey(STableCheckInfo* pCheckInfo, int32_t order, ...@@ -826,9 +827,10 @@ static TSKEY extractFirstTraverseKey(STableCheckInfo* pCheckInfo, int32_t order,
SSkipListNode* node = tSkipListIterGet(pCheckInfo->iiter); SSkipListNode* node = tSkipListIterGet(pCheckInfo->iiter);
if (node != NULL) { if (node != NULL) {
rimem = (STSRow*)SL_GET_NODE_DATA(node); rimem = (STSRow*)SL_GET_NODE_DATA(node);
if (TD_ROW_KEY(rimem) > maxVer) { // TODO: filter max version
rimem = NULL; // if (TD_ROW_VER(rimem) > maxVer) {
} // rimem = NULL;
// }
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册