From 4bac6c4fef1eb7ad9a3fffce9320bc368555f2f8 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Mon, 16 May 2022 18:29:34 +0800 Subject: [PATCH] fix(query): avoid copy the unassigned column to the destination datablock after filter applied. --- source/libs/executor/src/executorimpl.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/libs/executor/src/executorimpl.c b/source/libs/executor/src/executorimpl.c index 68417b4b8b..1cfabf2975 100644 --- a/source/libs/executor/src/executorimpl.c +++ b/source/libs/executor/src/executorimpl.c @@ -2055,6 +2055,11 @@ void extractQualifiedTupleByFilterResult(SSDataBlock* pBlock, const int8_t* rowR SColumnInfoData* pDst = taosArrayGet(px->pDataBlock, i); SColumnInfoData* pSrc = taosArrayGet(pBlock->pDataBlock, i); + // it is a reserved column for scalar function, and no data in this column yet. + if (pSrc->pData == NULL) { + continue; + } + int32_t numOfRows = 0; for (int32_t j = 0; j < totalRows; ++j) { if (rowRes[j] == 0) { -- GitLab