提交 4af0ba9e 编写于 作者: wmmhello's avatar wmmhello

TD-6129<feature> fix json encode error

上级 c15da274
...@@ -797,6 +797,12 @@ static int calcColWidth(TAOS_FIELD* field, int precision) { ...@@ -797,6 +797,12 @@ static int calcColWidth(TAOS_FIELD* field, int precision) {
return MAX(bytes, width); 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: case TSDB_DATA_TYPE_TIMESTAMP:
if (args.is_raw_time) { if (args.is_raw_time) {
......
...@@ -1106,7 +1106,7 @@ static int tsdbAddTableIntoIndex(STsdbMeta *pMeta, STable *pTable, bool refSuper ...@@ -1106,7 +1106,7 @@ static int tsdbAddTableIntoIndex(STsdbMeta *pMeta, STable *pTable, bool refSuper
continue; continue;
} }
void* tablist = taosHashGet(pSTable->jsonKeyMap, varDataVal(val) ,varDataLen(val)); void* tablist = taosHashGet(pSTable->jsonKeyMap, varDataVal(val), varDataLen(val));
if(tablist == NULL) { if(tablist == NULL) {
void* tablistNew = taosArrayInit(8, sizeof(JsonMapValue)); void* tablistNew = taosArrayInit(8, sizeof(JsonMapValue));
if(tablistNew == NULL){ if(tablistNew == NULL){
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册