feature: if num of tbnames is greater than vgroups, do not update vgroupList of table

This commit is contained in:
slzhou 2023-11-09 10:31:01 +08:00
parent 144856893c
commit 30cbf9ae5c
1 changed files with 4 additions and 0 deletions

View File

@ -4116,6 +4116,10 @@ static int32_t findEqualCondTbname(STranslateContext* pCxt, SNode* pWhere, SArra
static int32_t findVgroupsFromEqualTbname(STranslateContext* pCxt, SEqCondTbNameTableInfo* pInfo, SVgroupsInfo* vgsInfo) { static int32_t findVgroupsFromEqualTbname(STranslateContext* pCxt, SEqCondTbNameTableInfo* pInfo, SVgroupsInfo* vgsInfo) {
int32_t nVgroups = 0; int32_t nVgroups = 0;
int32_t nTbls = taosArrayGetSize(pInfo->aTbnames); int32_t nTbls = taosArrayGetSize(pInfo->aTbnames);
if (nTbls >= pInfo->pRealTable->pVgroupList->numOfVgroups) {
vgsInfo->numOfVgroups = 0;
}
for (int j = 0; j < nTbls; ++j) { for (int j = 0; j < nTbls; ++j) {
char* dbName = pInfo->pRealTable->table.dbName; char* dbName = pInfo->pRealTable->table.dbName;