From a0795fdd10b7794f4bd9dede1c97f0bfab950b46 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Thu, 23 Jun 2022 00:47:28 +0800 Subject: [PATCH] fix(query): set correct varchar length. --- source/common/src/tdatablock.c | 3 ++- source/libs/executor/src/executorimpl.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/source/common/src/tdatablock.c b/source/common/src/tdatablock.c index 0fab1c4f5a..565f8da0a0 100644 --- a/source/common/src/tdatablock.c +++ b/source/common/src/tdatablock.c @@ -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); diff --git a/source/libs/executor/src/executorimpl.c b/source/libs/executor/src/executorimpl.c index ed867bed45..188edaa68f 100644 --- a/source/libs/executor/src/executorimpl.c +++ b/source/libs/executor/src/executorimpl.c @@ -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));