fix(query): set correct length for json value.

This commit is contained in:
Haojun Liao 2024-05-08 22:28:49 +08:00
parent 81abf3fe6d
commit cbf994f04f
1 changed files with 6 additions and 1 deletions

View File

@ -1462,8 +1462,13 @@ static int32_t getPageBufIncForRow(SSDataBlock* pSrcBlock, int32_t srcRowIndex,
if (IS_VAR_DATA_TYPE(pColInfoData->info.type)) {
if ((pColInfoData->varmeta.offset[srcRowIndex] != -1) && (pColInfoData->pData)) {
char* p = colDataGetData(pColInfoData, srcRowIndex);
if (pColInfoData->info.type == TSDB_DATA_TYPE_JSON) {
size += getJsonValueLen(p);
} else {
size += varDataTLen(p);
}
}
size += sizeof(pColInfoData->varmeta.offset[0]);
} else {