diff --git a/2.0/src/client/inc/tsclient.h b/2.0/src/client/inc/tsclient.h index cdfabdf799..e14a3123ad 100644 --- a/2.0/src/client/inc/tsclient.h +++ b/2.0/src/client/inc/tsclient.h @@ -125,21 +125,10 @@ typedef struct SParsedDataColInfo { #define IS_DATA_COL_ORDERED(spd) ((spd->orderStatus) == (int8_t)ORDER_STATUS_ORDERED) typedef struct { - int32_t dataLen; // len of SDataRow - int32_t kvLen; // len of SKVRow -} SMemRowInfo; -typedef struct { - uint8_t memRowType; // default is 0, that is SDataRow - uint8_t compareStat; // 0 no need, 1 need compare - int32_t rowSize; - SMemRowInfo *rowInfo; + uint8_t memRowType; // default is 0, that is SDataRow + int32_t rowSize; } SMemRowBuilder; -typedef enum { - ROW_COMPARE_NO_NEED = 0, - ROW_COMPARE_NEED = 1, -} ERowCompareStat; - int tsParseTime(SStrToken *pToken, int64_t *time, char **next, char *error, int16_t timePrec); int initMemRowBuilder(SMemRowBuilder *pBuilder, uint32_t nRows, SParsedDataColInfo *pColInfo); diff --git a/2.0/src/client/src/tscParseInsert.c b/2.0/src/client/src/tscParseInsert.c index 6a0201d6a7..b2e2e950dc 100644 --- a/2.0/src/client/src/tscParseInsert.c +++ b/2.0/src/client/src/tscParseInsert.c @@ -43,12 +43,6 @@ static int32_t parseBoundColumns(SInsertStatementParam *pInsertParam, SParsedDat char *str, char **end); int initMemRowBuilder(SMemRowBuilder *pBuilder, uint32_t nRows, SParsedDataColInfo *pColInfo) { ASSERT(nRows >= 0 && pColInfo->numOfCols > 0 && (pColInfo->numOfBound <= pColInfo->numOfCols)); - if (nRows > 0) { - // already init(bind multiple rows by single column) - if (pBuilder->compareStat == ROW_COMPARE_NEED && (pBuilder->rowInfo != NULL)) { - return TSDB_CODE_SUCCESS; - } - } uint32_t dataLen = TD_MEM_ROW_DATA_HEAD_SIZE + pColInfo->allNullLen; uint32_t kvLen = TD_MEM_ROW_KV_HEAD_SIZE + pColInfo->numOfBound * sizeof(SColIdx) + pColInfo->boundNullLen; diff --git a/source/libs/parser/inc/dataBlockMgt.h b/source/libs/parser/inc/dataBlockMgt.h index 5b3554da02..df9f3714fc 100644 --- a/source/libs/parser/inc/dataBlockMgt.h +++ b/source/libs/parser/inc/dataBlockMgt.h @@ -34,11 +34,6 @@ typedef enum EValStat { VAL_STAT_NONE = 0x01, // 1 means no val } EValStat; -typedef enum ERowCompareStat { - ROW_COMPARE_NO_NEED = 0, - ROW_COMPARE_NEED = 1, -} ERowCompareStat; - typedef struct SBoundColumn { int32_t offset; // all column offset value int32_t toffset; // first part offset for SDataRow TODO: get offset from STSchema on future @@ -64,16 +59,9 @@ typedef struct SParsedDataColInfo { int8_t orderStatus; // bound columns } SParsedDataColInfo; -typedef struct SMemRowInfo { - int32_t dataLen; // len of SDataRow - int32_t kvLen; // len of SKVRow -} SMemRowInfo; - typedef struct { - uint8_t memRowType; // default is 0, that is SDataRow - uint8_t compareStat; // 0 no need, 1 need compare - int32_t rowSize; - SMemRowInfo *rowInfo; + uint8_t memRowType; // default is 0, that is SDataRow + int32_t rowSize; } SMemRowBuilder; typedef struct STableDataBlocks { diff --git a/source/libs/parser/src/dataBlockMgt.c b/source/libs/parser/src/dataBlockMgt.c index ca8813c6cb..ac45817802 100644 --- a/source/libs/parser/src/dataBlockMgt.c +++ b/source/libs/parser/src/dataBlockMgt.c @@ -572,12 +572,6 @@ int32_t allocateMemIfNeed(STableDataBlocks *pDataBlock, int32_t rowSize, int32_t int initMemRowBuilder(SMemRowBuilder *pBuilder, uint32_t nRows, SParsedDataColInfo *pColInfo) { ASSERT(nRows >= 0 && pColInfo->numOfCols > 0 && (pColInfo->numOfBound <= pColInfo->numOfCols)); - if (nRows > 0) { - // already init(bind multiple rows by single column) - if (pBuilder->compareStat == ROW_COMPARE_NEED && (pBuilder->rowInfo != NULL)) { - return TSDB_CODE_SUCCESS; - } - } uint32_t dataLen = TD_MEM_ROW_DATA_HEAD_SIZE + pColInfo->allNullLen; uint32_t kvLen = TD_MEM_ROW_KV_HEAD_SIZE + pColInfo->numOfBound * sizeof(SColIdx) + pColInfo->boundNullLen; diff --git a/source/libs/parser/src/insertParser.c b/source/libs/parser/src/insertParser.c index 6c619e5a3c..fb71e94eea 100644 --- a/source/libs/parser/src/insertParser.c +++ b/source/libs/parser/src/insertParser.c @@ -262,9 +262,6 @@ typedef struct SMemParam { SMemRow row; SSchema* schema; int32_t toffset; - uint8_t compareStat; - int32_t dataLen; - int32_t kvLen; } SMemParam; static FORCE_INLINE int32_t MemRowAppend(const void *value, int32_t len, void *param) { @@ -426,7 +423,6 @@ static int parseOneRow(SInsertParseContext* pCxt, STableDataBlocks* pDataBlocks, NEXT_TOKEN(pCxt->pSql, sToken); SSchema *pSchema = &schema[spd->boundedColumns[i] - 1]; param.schema = pSchema; - param.compareStat = pBuilder->compareStat; getMemRowAppendInfo(schema, pBuilder->memRowType, spd, i, ¶m.toffset); CHECK_CODE(parseValueToken(&pCxt->pSql, &sToken, pSchema, timePrec, tmpTokenBuf, MemRowAppend, ¶m, &pCxt->msg));