From 3e5b18d4b889a2e8dae3f98e92d55b5358a57af4 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Mon, 13 Jun 2022 10:23:16 +0800 Subject: [PATCH] fix(query): add null pointer check. --- source/libs/executor/src/executorimpl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/libs/executor/src/executorimpl.c b/source/libs/executor/src/executorimpl.c index c68b94d9aa..6a93936e65 100644 --- a/source/libs/executor/src/executorimpl.c +++ b/source/libs/executor/src/executorimpl.c @@ -2579,6 +2579,7 @@ int32_t setDataBlockFromFetchRsp(SSDataBlock* pRes, SLoadRemoteDataInfo* pLoadIn SArray* pColList) { if (pColList == NULL) { // data from other sources blockCompressDecode(pRes, numOfOutput, numOfRows, pData); + pRes->info.rows = numOfRows; } else { // extract data according to pColList ASSERT(numOfOutput == taosArrayGetSize(pColList)); char* pStart = pData; @@ -2615,15 +2616,15 @@ int32_t setDataBlockFromFetchRsp(SSDataBlock* pRes, SLoadRemoteDataInfo* pLoadIn } blockCompressDecode(pBlock, numOfCols, numOfRows, pStart); + // data from mnode + pRes->info.rows = numOfRows; relocateColumnData(pRes, pColList, pBlock->pDataBlock); taosArrayDestroy(pBlock->pDataBlock); taosMemoryFree(pBlock); // blockDataDestroy(pBlock); } - pRes->info.rows = numOfRows; - // todo move this to time window aggregator, since the primary timestamp may not be known by exchange operator. blockDataUpdateTsWindow(pRes, 0); -- GitLab