diff --git a/src/kit/shell/src/shellEngine.c b/src/kit/shell/src/shellEngine.c index 4dfe424b11e82c78d5acbbcc7471c093cd75e7aa..53a07380cf03f6727470de78c5c0d7cf6a7394d8 100644 --- a/src/kit/shell/src/shellEngine.c +++ b/src/kit/shell/src/shellEngine.c @@ -797,6 +797,12 @@ static int calcColWidth(TAOS_FIELD* field, int precision) { return MAX(bytes, width); } } + case TSDB_DATA_TYPE_JSON: + if (field->bytes > tsMaxBinaryDisplayWidth) { + return MAX(tsMaxBinaryDisplayWidth, width); + } else { + return MAX(field->bytes, width); + } case TSDB_DATA_TYPE_TIMESTAMP: if (args.is_raw_time) { diff --git a/src/tsdb/src/tsdbMeta.c b/src/tsdb/src/tsdbMeta.c index 23db395de967aa2b99f247844e90e1083bd25b2c..d9535c50d419248538c6b41ae2a3474fdd698869 100644 --- a/src/tsdb/src/tsdbMeta.c +++ b/src/tsdb/src/tsdbMeta.c @@ -1106,7 +1106,7 @@ static int tsdbAddTableIntoIndex(STsdbMeta *pMeta, STable *pTable, bool refSuper continue; } - void* tablist = taosHashGet(pSTable->jsonKeyMap, varDataVal(val) ,varDataLen(val)); + void* tablist = taosHashGet(pSTable->jsonKeyMap, varDataVal(val), varDataLen(val)); if(tablist == NULL) { void* tablistNew = taosArrayInit(8, sizeof(JsonMapValue)); if(tablistNew == NULL){