fix(query): set correct length for json value.
This commit is contained in:
parent
81abf3fe6d
commit
cbf994f04f
|
@ -1462,7 +1462,12 @@ static int32_t getPageBufIncForRow(SSDataBlock* pSrcBlock, int32_t srcRowIndex,
|
||||||
if (IS_VAR_DATA_TYPE(pColInfoData->info.type)) {
|
if (IS_VAR_DATA_TYPE(pColInfoData->info.type)) {
|
||||||
if ((pColInfoData->varmeta.offset[srcRowIndex] != -1) && (pColInfoData->pData)) {
|
if ((pColInfoData->varmeta.offset[srcRowIndex] != -1) && (pColInfoData->pData)) {
|
||||||
char* p = colDataGetData(pColInfoData, srcRowIndex);
|
char* p = colDataGetData(pColInfoData, srcRowIndex);
|
||||||
size += varDataTLen(p);
|
|
||||||
|
if (pColInfoData->info.type == TSDB_DATA_TYPE_JSON) {
|
||||||
|
size += getJsonValueLen(p);
|
||||||
|
} else {
|
||||||
|
size += varDataTLen(p);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
size += sizeof(pColInfoData->varmeta.offset[0]);
|
size += sizeof(pColInfoData->varmeta.offset[0]);
|
||||||
|
|
Loading…
Reference in New Issue