From 18160eb48ec99338f43e1dec6760b9f379c4222c Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Tue, 9 Nov 2021 15:11:54 +0800 Subject: [PATCH] add null json value support --- src/client/src/tscUtil.c | 1 - src/query/src/qExecutor.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/client/src/tscUtil.c b/src/client/src/tscUtil.c index 5d3c1ac9ef..de0d57fc79 100644 --- a/src/client/src/tscUtil.c +++ b/src/client/src/tscUtil.c @@ -777,7 +777,6 @@ static void setResRawPtrImpl(SSqlRes* pRes, SInternalField* pInfo, int32_t i, bo tscError("charset:%s to %s. val:%s convert failed.", DEFAULT_UNICODE_ENCODEC, tsCharset, (char*)p); } } - return; }else if (type == TSDB_DATA_TYPE_DOUBLE) { double jsonVd = *(double*)(realData); sprintf(varDataVal(dst), "%.9lf", jsonVd); diff --git a/src/query/src/qExecutor.c b/src/query/src/qExecutor.c index bfdc23154c..38c9dd531b 100644 --- a/src/query/src/qExecutor.c +++ b/src/query/src/qExecutor.c @@ -3401,7 +3401,7 @@ static void doSetTagValueInParam(void* pTable, char* param, int32_t paramLen, in }else{ getJsonTagValueAll(val, jsonVal, TSDB_MAX_JSON_TAGS_LEN); } - tVariantCreateFromBinary(tag, jsonVal, varDataTLen(jsonVal), type); + tVariantCreateFromBinary(tag, jsonVal, CHAR_BYTES + varDataTLen(POINTER_SHIFT(jsonVal,CHAR_BYTES)), type); } else { tVariantCreateFromBinary(tag, val, bytes, type); } -- GitLab