diff --git a/source/dnode/vnode/src/inc/tsdb.h b/source/dnode/vnode/src/inc/tsdb.h index 7fe0cc5cbb..e1293c7f11 100644 --- a/source/dnode/vnode/src/inc/tsdb.h +++ b/source/dnode/vnode/src/inc/tsdb.h @@ -966,6 +966,29 @@ static FORCE_INLINE int32_t tsdbKeyCmprFn(const void *p1, const void *p2) { // #define SL_NODE_FORWARD(n, l) ((n)->forwards[l]) // #define SL_NODE_BACKWARD(n, l) ((n)->forwards[(n)->level + (l)]) +static FORCE_INLINE TSDBROW *tsdbTbDataIterGet(STbDataIter *pIter) { + if (pIter == NULL) return NULL; + + if (pIter->pRow) { + return pIter->pRow; + } + + if (pIter->backward) { + if (pIter->pNode == pIter->pTbData->sl.pHead) { + return NULL; + } + } else { + if (pIter->pNode == pIter->pTbData->sl.pTail) { + return NULL; + } + } + + pIter->pRow = &pIter->row; + pIter->row = pIter->pNode->row; + + return pIter->pRow; +} + typedef struct { int64_t suid; int64_t uid; diff --git a/source/dnode/vnode/src/tsdb/tsdbIter.h b/source/dnode/vnode/src/tsdb/tsdbIter.h index d0b5a0249b..05449d2042 100644 --- a/source/dnode/vnode/src/tsdb/tsdbIter.h +++ b/source/dnode/vnode/src/tsdb/tsdbIter.h @@ -66,29 +66,6 @@ int32_t tsdbIterMergerSkipTableData(SIterMerger *merger, const TABLEID *tbid); SRowInfo *tsdbIterMergerGetData(SIterMerger *merger); STombRecord *tsdbIterMergerGetTombRecord(SIterMerger *merger); -FORCE_INLINE TSDBROW *tsdbTbDataIterGet(STbDataIter *pIter) { - if (pIter == NULL) return NULL; - - if (pIter->pRow) { - return pIter->pRow; - } - - if (pIter->backward) { - if (pIter->pNode == pIter->pTbData->sl.pHead) { - return NULL; - } - } else { - if (pIter->pNode == pIter->pTbData->sl.pTail) { - return NULL; - } - } - - pIter->pRow = &pIter->row; - pIter->row = pIter->pNode->row; - - return pIter->pRow; -} - #ifdef __cplusplus } #endif