refactor: fix error in merge

This commit is contained in:
wangmm0220 2022-04-20 18:54:15 +08:00
parent 0fb41733ea
commit 1ab6342018
3 changed files with 2 additions and 3 deletions

View File

@ -262,7 +262,6 @@ int32_t trimString(const char* src, int32_t len, char* dst, int32_t dlen) {
j++; j++;
} }
dst[j] = '\0'; dst[j] = '\0';
strtrim(dst);
return j; return j;
} }

View File

@ -287,7 +287,6 @@ static FORCE_INLINE void varToNchar(char* buf, SScalarParam* pOut, int32_t rowIn
//TODO opt performance, tmp is not needed. //TODO opt performance, tmp is not needed.
int32_t vectorConvertFromVarData(const SScalarParam* pIn, SScalarParam* pOut, int32_t inType, int32_t outType) { 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; int32_t bufSize = pIn->columnData->info.bytes;
char *tmp = taosMemoryMalloc(bufSize + VARSTR_HEADER_SIZE); char *tmp = taosMemoryMalloc(bufSize + VARSTR_HEADER_SIZE);

View File

@ -761,7 +761,8 @@ static int calcColWidth(TAOS_FIELD *field, int precision) {
return TMAX(field->bytes, width); 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; int16_t bytes = field->bytes * TSDB_NCHAR_SIZE;
if (bytes > tsMaxBinaryDisplayWidth) { if (bytes > tsMaxBinaryDisplayWidth) {
return TMAX(tsMaxBinaryDisplayWidth, width); return TMAX(tsMaxBinaryDisplayWidth, width);