diff --git a/src/client/src/tscParseInsert.c b/src/client/src/tscParseInsert.c index 889d8a55b411105d4f43025dd23ed00f10583d7d..1b6a6c21a977e22bb9583b31e73f3ee7b710ca04 100644 --- a/src/client/src/tscParseInsert.c +++ b/src/client/src/tscParseInsert.c @@ -1781,7 +1781,6 @@ static void parseFileSendDataBlock(void *param, TAOS_RES *tres, int32_t numOfRow } int32_t extendedRowSize = getExtendedRowSize(pTableDataBlock); - tscAllocateMemIfNeed(pTableDataBlock, extendedRowSize, &maxRows); tokenBuf = calloc(1, TSDB_MAX_BYTES_PER_ROW); if (tokenBuf == NULL) { @@ -1789,9 +1788,9 @@ static void parseFileSendDataBlock(void *param, TAOS_RES *tres, int32_t numOfRow goto _error; } - --maxRows; // 1 more row needed to facilitate the SDataRow/SKVRow convert - ASSERT(maxRows > 0); - + // insert from .csv means full and ordered columns, thus use SDataRow all the time and no need to covert + ASSERT(SMEM_ROW_DATA == pTableDataBlock->rowBuilder.memRowType && + ROW_COMPARE_NO_NEED == pTableDataBlock->rowBuilder.compareStat); int32_t convertOffset = 0; while ((readLen = tgetline(&line, &n, fp)) != -1) { if (('\r' == line[readLen - 1]) || ('\n' == line[readLen - 1])) { @@ -1818,10 +1817,6 @@ static void parseFileSendDataBlock(void *param, TAOS_RES *tres, int32_t numOfRow break; } } - if (convertOffset) { - char *convertedSMemRow = pTableDataBlock->pData + pTableDataBlock->size; - memcpy(convertedSMemRow - convertOffset * extendedRowSize, convertedSMemRow, (size_t)memRowTLen(convertedSMemRow)); - } tfree(tokenBuf); tfree(line);