From 1ab6342018927dfcbce4c7f30f7f3ec0c08a44ca Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Wed, 20 Apr 2022 18:54:15 +0800 Subject: [PATCH] refactor: fix error in merge --- source/libs/parser/src/parUtil.c | 1 - source/libs/scalar/src/sclvector.c | 1 - tools/shell/src/shellEngine.c | 3 ++- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/source/libs/parser/src/parUtil.c b/source/libs/parser/src/parUtil.c index 0ff5843736..7f945eb70c 100644 --- a/source/libs/parser/src/parUtil.c +++ b/source/libs/parser/src/parUtil.c @@ -262,7 +262,6 @@ int32_t trimString(const char* src, int32_t len, char* dst, int32_t dlen) { j++; } dst[j] = '\0'; - strtrim(dst); return j; } diff --git a/source/libs/scalar/src/sclvector.c b/source/libs/scalar/src/sclvector.c index ae8c395997..d484738328 100644 --- a/source/libs/scalar/src/sclvector.c +++ b/source/libs/scalar/src/sclvector.c @@ -287,7 +287,6 @@ static FORCE_INLINE void varToNchar(char* buf, SScalarParam* pOut, int32_t rowIn //TODO opt performance, tmp is not needed. int32_t vectorConvertFromVarData(const SScalarParam* pIn, SScalarParam* pOut, int32_t inType, int32_t outType) { - ASSERT(!IS_VAR_DATA_TYPE(outType)); int32_t bufSize = pIn->columnData->info.bytes; char *tmp = taosMemoryMalloc(bufSize + VARSTR_HEADER_SIZE); diff --git a/tools/shell/src/shellEngine.c b/tools/shell/src/shellEngine.c index e8f53ef981..ca5bf69795 100644 --- a/tools/shell/src/shellEngine.c +++ b/tools/shell/src/shellEngine.c @@ -761,7 +761,8 @@ static int calcColWidth(TAOS_FIELD *field, int precision) { return TMAX(field->bytes, width); } - case TSDB_DATA_TYPE_NCHAR: { + case TSDB_DATA_TYPE_NCHAR: + case TSDB_DATA_TYPE_JSON:{ int16_t bytes = field->bytes * TSDB_NCHAR_SIZE; if (bytes > tsMaxBinaryDisplayWidth) { return TMAX(tsMaxBinaryDisplayWidth, width); -- GitLab