From 87411e72a8448f13a81290ff0f5052e6041596c3 Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Mon, 10 Jan 2022 01:30:12 -0500 Subject: [PATCH] TD-12678 bug fix --- source/libs/parser/test/mockCatalogService.cpp | 3 +++ source/libs/planner/src/physicalPlan.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/source/libs/parser/test/mockCatalogService.cpp b/source/libs/parser/test/mockCatalogService.cpp index 2a0f6b38eb..e2b8766700 100644 --- a/source/libs/parser/test/mockCatalogService.cpp +++ b/source/libs/parser/test/mockCatalogService.cpp @@ -112,6 +112,9 @@ public: int32_t catalogGetTableHashVgroup(const SName* pTableName, SVgroupInfo* vgInfo) const { // todo vgInfo->vgId = 1; + vgInfo->numOfEps = 1; + vgInfo->epAddr[0].port = 6030; + strcpy(vgInfo->epAddr[0].fqdn, "node1"); return 0; } diff --git a/source/libs/planner/src/physicalPlan.c b/source/libs/planner/src/physicalPlan.c index 7c427efb5a..a38d110d5f 100644 --- a/source/libs/planner/src/physicalPlan.c +++ b/source/libs/planner/src/physicalPlan.c @@ -234,7 +234,7 @@ static SSubplan* initSubplan(SPlanContext* pCxt, int32_t type) { static void vgroupInfoToEpSet(const SVgroupInfo* vg, SQueryNodeAddr* execNode) { execNode->nodeId = vg->vgId; - execNode->inUse = 0; // todo + execNode->inUse = vg->inUse; execNode->numOfEps = vg->numOfEps; for (int8_t i = 0; i < vg->numOfEps; ++i) { execNode->epAddr[i] = vg->epAddr[i];