Code review comment: yes. when base table is mv, we should consider the outdated partitions of mv

Code under review:
public Set<String> getUpdatedPartitionNamesOfTable(Table base, boolean withMv) {
        if (!base.isLocalTable()) {
            
            return Sets.newHashSet();
        }

        OlapTable baseTable = (OlapTable) base;
        Map<String, BasePartitionInfo> baseTableVisibleVersionMap = getRefreshScheme()
                .getAsyncRefreshContext()
                .getBaseTableVisibleVersionMap()
                .computeIfAbsent(baseTable.getId(), k -> Maps.newHashMap());
        Set<String> result = Sets.newHashSet();
        
        for (String partitionName : baseTable.getPartitionNames()) {
            if (!baseTableVisibleVersionMap.containsKey(partitionName)
                    && baseTable.getPartition(partitionName).getVisibleVersion() != 1) {
                result.add(partitionName);
            }
        }

        for (Map.Entry<String, BasePartitionInfo> versionEntry : baseTableVisibleVersionMap.entrySet()) {
            String basePartitionName = versionEntry.getKey();
            Partition basePartition = baseTable.getPartition(basePartitionName);
            if (basePartition == null) {
                
                result.addAll(baseTable.getPartitionNames());
                return result;
            }
            BasePartitionInfo basePartitionInfo = versionEntry.getValue();
            if (basePartitionInfo == null
                    || basePartitionInfo.getId() != basePartition.getId()
                    || basePartition.getVisibleVersion() > basePartitionInfo.getVersion()) {
                result.add(basePartitionName);
            }
        }
        if (withMv && baseTable.isMaterializedView()) {
            Set<String> partitionNames = ((MaterializedView) baseTable).getPartitionNamesToRefreshForMv();
            result.addAll(partitionNames);
        }
        return result;
    }

Line commented on: if (withMv && baseTable.isMaterializedView()) {

Revised code:
public Set<String> getUpdatedPartitionNamesOfTable(Table base, boolean withMv) {
        if (!base.isLocalTable()) {
            
            return Sets.newHashSet();
        }

        OlapTable baseTable = (OlapTable) base;
        Map<String, BasePartitionInfo> baseTableVisibleVersionMap = getRefreshScheme()
                .getAsyncRefreshContext()
                .getBaseTableVisibleVersionMap()
                .computeIfAbsent(baseTable.getId(), k -> Maps.newHashMap());
        Set<String> result = Sets.newHashSet();
        
        for (String partitionName : baseTable.getPartitionNames()) {
            if (!baseTableVisibleVersionMap.containsKey(partitionName)
                    && baseTable.getPartition(partitionName).getVisibleVersion() != 1) {
                result.add(partitionName);
            }
        }

        for (Map.Entry<String, BasePartitionInfo> versionEntry : baseTableVisibleVersionMap.entrySet()) {
            String basePartitionName = versionEntry.getKey();
            Partition basePartition = baseTable.getPartition(basePartitionName);
            if (basePartition == null) {
                
                result.addAll(baseTable.getPartitionNames());
                return result;
            }
            BasePartitionInfo basePartitionInfo = versionEntry.getValue();
            if (basePartitionInfo == null
                    || basePartitionInfo.getId() != basePartition.getId()
                    || basePartition.getVisibleVersion() > basePartitionInfo.getVersion()) {
                result.add(basePartitionName);
            }
        }
        if (withMv && baseTable.isMaterializedView()) {
            Set<String> partitionNames = ((MaterializedView) baseTable).getPartitionNamesToRefreshForMv();
            result.addAll(partitionNames);
        }
        return result;
    }