From 9367be016dae6c7ba297c0c8dbebc4f6e38f18b8 Mon Sep 17 00:00:00 2001 From: Shungang Li Date: Fri, 17 May 2024 11:37:30 +0800 Subject: [PATCH] enh: remove unused code --- include/common/tdataformat.h | 1 - source/common/src/tdataformat.c | 19 ++----------------- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/include/common/tdataformat.h b/include/common/tdataformat.h index 4a978dd34c..ce9b95522a 100644 --- a/include/common/tdataformat.h +++ b/include/common/tdataformat.h @@ -142,7 +142,6 @@ int32_t tRowKeyAssign(SRowKey *pDst, SRowKey *pSrc); int32_t tRowIterOpen(SRow *pRow, STSchema *pTSchema, SRowIter **ppIter); void tRowIterClose(SRowIter **ppIter); SColVal *tRowIterNext(SRowIter *pIter); -SColVal *tRowIterMoveTo(SRowIter *pIter, int32_t iTColum); // STag ================================ int32_t tTagNew(SArray *pArray, int32_t version, int8_t isJson, STag **ppTag); diff --git a/source/common/src/tdataformat.c b/source/common/src/tdataformat.c index 48ab4f0d4e..ae3fe6a2a0 100644 --- a/source/common/src/tdataformat.c +++ b/source/common/src/tdataformat.c @@ -774,7 +774,7 @@ void tRowIterClose(SRowIter **ppIter) { *ppIter = NULL; } -static SColVal *tRowIterGetValue(SRowIter *pIter) { +SColVal *tRowIterNext(SRowIter *pIter) { if (pIter->iTColumn >= pIter->pTSchema->numOfCols) { return NULL; } @@ -896,25 +896,10 @@ static SColVal *tRowIterGetValue(SRowIter *pIter) { } _exit: + pIter->iTColumn++; return &pIter->cv; } -SColVal* tRowIterNext(SRowIter *pIter) { - SColVal* pColVal = tRowIterGetValue(pIter); - if (pColVal) { - pIter->iTColumn++; - } - return pColVal; -} - -SColVal *tRowIterMoveTo(SRowIter *pIter, int32_t iTColum) { - pIter->iTColumn = iTColum; - if (pIter->iTColumn < 0 || pIter->iTColumn >= pIter->pTSchema->numOfCols) { - return NULL; - } - return tRowIterGetValue(pIter); -} - static int32_t tRowNoneUpsertColData(SColData *aColData, int32_t nColData, int32_t flag) { int32_t code = 0;