yoock commented on code in PR #54033:
URL: https://github.com/apache/doris/pull/54033#discussion_r2241769781


##########
fe/fe-core/src/main/java/org/apache/doris/catalog/MTMV.java:
##########
@@ -219,7 +223,11 @@ public void addTaskResult(MTMVTask task, MTMVRelation 
relation,
                 this.status.setRefreshState(MTMVRefreshState.FAIL);
             }
             this.jobInfo.addHistoryTask(task);
-            this.refreshSnapshot.updateSnapshots(partitionSnapshots, 
getPartitionNames());
+            Set<String> partitionNames = getPartitionNames();
+            if (incrementalRefresh) {
+                partitionNames.add(this.name);

Review Comment:
   The incremental materialized view maps snapshot information through mvName 
and does not retain partition information. If the materialized view table type 
is partitioned, the relevant information corresponding to mvName -> 
MTMVRefreshPartitionSnapshot will be removed. Therefore, it is necessary to add 
mvName here to ensure that mvName -> MTMVRefreshPartitionSnapshot is not deleted
   
   <img width="1153" height="438" alt="image" 
src="https://github.com/user-attachments/assets/81098f86-a3b7-4573-ba77-ef89d62559be";
 />
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to