fix(query): set correct varchar length.

This commit is contained in:
Haojun Liao 2022-06-23 00:47:28 +08:00
parent 32e479858f
commit a0795fdd10
2 changed files with 3 additions and 2 deletions

View File

@ -1897,8 +1897,9 @@ const char* blockCompressDecode(SSDataBlock* pBlock, int32_t numOfCols, int32_t
pColInfoData->pData = tmp;
pColInfoData->varmeta.allocLen = colLen[i];
pColInfoData->varmeta.length = colLen[i];
}
pColInfoData->varmeta.length = colLen[i];
} else {
memcpy(pColInfoData->nullbitmap, pStart, BitmapLen(numOfRows));
pStart += BitmapLen(numOfRows);

View File

@ -2048,7 +2048,7 @@ int32_t extractDataBlockFromFetchRsp(SSDataBlock* pRes, SLoadRemoteDataInfo* pLo
SArray* pColList) {
if (pColList == NULL) { // data from other sources
blockDataCleanup(pRes);
blockDataEnsureCapacity(pRes, numOfRows);
// blockDataEnsureCapacity(pRes, numOfRows);
blockCompressDecode(pRes, numOfOutput, numOfRows, pData);
} else { // extract data according to pColList
ASSERT(numOfOutput == taosArrayGetSize(pColList));