From d1dce49f14d84e0ab2fd9aadd49dc31d5b1697bb Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Thu, 27 Jan 2022 18:48:12 +0800 Subject: [PATCH] [td-11818] fix bug in topic . --- source/libs/executor/src/executorimpl.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/source/libs/executor/src/executorimpl.c b/source/libs/executor/src/executorimpl.c index 5797837772..a0b16f4f20 100644 --- a/source/libs/executor/src/executorimpl.c +++ b/source/libs/executor/src/executorimpl.c @@ -7778,7 +7778,19 @@ SOperatorInfo* doCreateOperatorTreeNode(SPhyNode* pPhyNode, SExecTaskInfo* pTask SArray* pa = taosArrayGetP(groupInfo.pGroupList, 0); ASSERT(taosArrayGetSize(groupInfo.pGroupList) == 1); - return createStreamScanOperatorInfo(readerHandle, pPhyNode->pTargets, pa, pTaskInfo); + // Transfer the Array of STableKeyInfo into uid list. + size_t numOfTables = taosArrayGetSize(pa); + SArray* idList = taosArrayInit(numOfTables, sizeof(uint64_t)); + for(int32_t i = 0; i < numOfTables; ++i) { + STableKeyInfo* pkeyInfo = taosArrayGet(pa, i); + taosArrayPush(idList, &pkeyInfo->uid); + } + + SOperatorInfo* pOperator = createStreamScanOperatorInfo(readerHandle, pPhyNode->pTargets, idList, pTaskInfo); + taosArrayDestroy(idList); + + //TODO destroy groupInfo + return pOperator; } }