diff --git a/src/common/inc/tdataformat.h b/src/common/inc/tdataformat.h index ba9196c52a4f1a37698461a74f198ea4c7d186a6..f8cc374eb00e953ce307070f27a585146f5bc6da 100644 --- a/src/common/inc/tdataformat.h +++ b/src/common/inc/tdataformat.h @@ -560,6 +560,8 @@ static FORCE_INLINE int tdAddColToKVRow(SKVRowBuilder *pBuilder, int16_t colId, char* jumpType = (char*)value; if(isJumpJsonVType) jumpType += CHAR_BYTES; int tlen = IS_VAR_DATA_TYPE(type) ? varDataTLen(jumpType) : TYPE_BYTES[type]; + if(isJumpJsonVType) tlen += CHAR_BYTES; // add type size + if (tlen > pBuilder->alloc - pBuilder->size) { while (tlen > pBuilder->alloc - pBuilder->size) { pBuilder->alloc *= 2;