Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ public static boolean isMTMVPartitionSync(MTMVRefreshContext refreshContext, Str
Set<TableNameInfo> excludedTriggerTables) throws AnalysisException {
MTMV mtmv = refreshContext.getMtmv();
Map<MTMVRelatedTableIf, Set<String>> partitionMappings = refreshContext.getByPartitionName(partitionName);
Set<TableNameInfo> excludedTriggerTablesToCheck = Sets.newHashSet(excludedTriggerTables);
if (mtmv.getMvPartitionInfo().getPartitionType() != MTMVPartitionType.SELF_MANAGE) {
if (MapUtils.isEmpty(partitionMappings)) {
LOG.warn("can not found pct partition, partitionName: {}, mtmvName: {}",
Expand All @@ -104,7 +105,7 @@ public static boolean isMTMVPartitionSync(MTMVRefreshContext refreshContext, Str
for (MTMVRelatedTableIf pctTable : pctTables) {
Set<String> relatedPartitionNames = partitionMappings.getOrDefault(pctTable, Sets.newHashSet());
// if follow base table, not need compare with related table, only should compare with related partition
excludedTriggerTables.add(TableNameInfoUtils.fromCatalogDb(
excludedTriggerTablesToCheck.add(TableNameInfoUtils.fromCatalogDb(
pctTable.getDatabase().getCatalog(),
pctTable.getDatabase(), pctTable));
if (!isSyncWithPartitions(refreshContext, partitionName, relatedPartitionNames, pctTable)) {
Expand All @@ -114,7 +115,7 @@ public static boolean isMTMVPartitionSync(MTMVRefreshContext refreshContext, Str

}
return isSyncWithAllBaseTables(refreshContext, partitionName, tables,
excludedTriggerTables);
excludedTriggerTablesToCheck);

}

Expand Down
Loading