From 7186767fe253888609b502444daf38423db0707b Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Tue, 9 Nov 2021 19:46:03 +0800 Subject: [PATCH] add json compare function support --- src/client/src/tscUtil.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/client/src/tscUtil.c b/src/client/src/tscUtil.c index 5c95bd94b8..588853d999 100644 --- a/src/client/src/tscUtil.c +++ b/src/client/src/tscUtil.c @@ -5387,21 +5387,21 @@ void* getJsonTagValueElment(STable* data, char* key, int32_t keyLen, char* dst, char* realData = POINTER_SHIFT(result, CHAR_BYTES); if(*(char*)result == TSDB_DATA_TYPE_NCHAR || *(char*)result == TSDB_DATA_TYPE_BINARY) { assert(varDataTLen(realData) < bytes); - if(!dst) return realData; + if(!dst) return result; memcpy(dst, result, CHAR_BYTES + varDataTLen(realData)); return dst; }else if (*(char*)result == TSDB_DATA_TYPE_DOUBLE || *(char*)result == TSDB_DATA_TYPE_BIGINT) { - if(!dst) return realData; + if(!dst) return result; memcpy(dst, result, CHAR_BYTES + LONG_BYTES); return dst; }else if (*(char*)result == TSDB_DATA_TYPE_BOOL) { - if(!dst) return realData; + if(!dst) return result; memcpy(dst, result, CHAR_BYTES + CHAR_BYTES); return dst; }else { assert(0); } - return realData; + return result; } void getJsonTagValueAll(void* data, void* dst, int16_t bytes) { -- GitLab