From d6955fd2bd6179aafb6549dfbc10a8ad63a25585 Mon Sep 17 00:00:00 2001 From: dapan1121 Date: Tue, 3 Sep 2024 17:15:32 +0800 Subject: [PATCH] fix: column decode has null issue --- source/common/src/tdatablock.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/source/common/src/tdatablock.c b/source/common/src/tdatablock.c index 5dbe01d8ba..816bf3a757 100644 --- a/source/common/src/tdatablock.c +++ b/source/common/src/tdatablock.c @@ -3126,6 +3126,11 @@ int32_t blockDecode(SSDataBlock* pBlock, const char* pData, const char** pEndPos pStart += BitmapLen(numOfRows); } + // TODO + // setting this flag to true temporarily so aggregate function on stable will + // examine NULL value for non-primary key column + pColInfoData->hasNull = true; + if (colLen[i] > 0) { memcpy(pColInfoData->pData, pStart, colLen[i]); } else if (!colDataIsNull_s(pColInfoData, 0) && pColInfoData->info.type != TSDB_DATA_TYPE_NULL) { @@ -3134,10 +3139,6 @@ int32_t blockDecode(SSDataBlock* pBlock, const char* pData, const char** pEndPos return terrno; } - // TODO - // setting this flag to true temporarily so aggregate function on stable will - // examine NULL value for non-primary key column - pColInfoData->hasNull = true; pStart += colLen[i]; }