From c7bbd9354b7a4c83132a830d73ccdebcbb3365cb Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Thu, 9 Jun 2022 10:17:43 +0800 Subject: [PATCH] fix(query): set correct column number value for ssdatablock. --- source/common/src/tdatablock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/common/src/tdatablock.c b/source/common/src/tdatablock.c index fd2b93309e..a3a94c50f2 100644 --- a/source/common/src/tdatablock.c +++ b/source/common/src/tdatablock.c @@ -1945,7 +1945,6 @@ void blockCompressEncode(const SSDataBlock* pBlock, char* data, int32_t* dataLen const char* blockCompressDecode(SSDataBlock* pBlock, int32_t numOfCols, int32_t numOfRows, const char* pData) { blockDataEnsureCapacity(pBlock, numOfRows); pBlock->info.rows = numOfRows; - pBlock->info.numOfCols = numOfCols; const char* pStart = pData; @@ -1960,7 +1959,8 @@ const char* blockCompressDecode(SSDataBlock* pBlock, int32_t numOfCols, int32_t taosArraySetSize(pBlock->pDataBlock, numOfCols); } - ASSERT(pBlock->pDataBlock->size == numOfCols); + pBlock->info.numOfCols = taosArrayGetSize(pBlock->pDataBlock); + ASSERT(pBlock->pDataBlock->size >= numOfCols); for (int32_t i = 0; i < numOfCols; ++i) { SColumnInfoData* pColInfoData = taosArrayGet(pBlock->pDataBlock, i); -- GitLab