From 365e6eec808ee4c177545427a01eafa3732a3cab Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Sun, 30 Oct 2022 11:29:55 +0800 Subject: [PATCH] refactor: do some internal refactor. --- source/libs/executor/src/executil.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/source/libs/executor/src/executil.c b/source/libs/executor/src/executil.c index bb65a9f7f2..0f2e5194c1 100644 --- a/source/libs/executor/src/executil.c +++ b/source/libs/executor/src/executil.c @@ -1697,12 +1697,7 @@ int32_t getTablesOfGroup(const STableListInfo* pTableList, int32_t ordinalGroupI // 1. only one group exists, and 2. one table exists for each group. if (total == 1) { *size = getTotalTables(pTableList); - if (*size > 0) { - *pKeyInfo = taosArrayGet(pTableList->pTableList, 0); - } else { - *pKeyInfo = NULL; - } - + *pKeyInfo = (*size == 0)? NULL:taosArrayGet(pTableList->pTableList, 0); return TSDB_CODE_SUCCESS; } else if (total == getTotalTables(pTableList)) { *size = 1; @@ -1723,7 +1718,6 @@ int32_t getTablesOfGroup(const STableListInfo* pTableList, int32_t ordinalGroupI int32_t getNumOfOutputGroups(const STableListInfo* pTableList) { return pTableList->numOfOuputGroups; } -// todo remove it bool oneTableForEachGroup(const STableListInfo* pTableList) { return pTableList->oneTableForEachGroup; } void destroyTableList(STableListInfo* pTableqinfoList) { -- GitLab