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


##########
fe/fe-core/src/main/java/org/apache/doris/job/extensions/mtmv/MTMVTask.java:
##########
@@ -230,7 +242,38 @@ public void run() throws JobException {
             MetaLockUtils.readLockTables(tableIfs);
             try {
                 context = MTMVRefreshContext.buildContext(mtmv);
-                this.needRefreshPartitions = 
calculateNeedRefreshPartitions(context);
+                if (mtmv.getIncrementalRefresh()) {
+                    Set<BaseTableInfo> baseTables = 
relation.getBaseTablesOneLevel();
+                    if (baseTables.size() != 1) {
+                        throw new RuntimeException("Only support incremental 
refresh for single table MTMV");
+                    }
+                    BaseTableInfo baseTableInfo = baseTables.iterator().next();
+                    MTMVSnapshotIf mvSnapshot = 
mtmv.getRefreshSnapshot().getMVSnapshot(mtmv.getName(), baseTableInfo);

Review Comment:
   The snapshot information is persisted through the following methods:
   <img width="663" height="411" alt="image" 
src="https://github.com/user-attachments/assets/40978973-fc4b-4832-a3cd-2cc5e62485f4";
 />
   <img width="1034" height="198" alt="image" 
src="https://github.com/user-attachments/assets/72cc04d7-aaa8-47e2-bca1-c998fc72b1f0";
 />
   <img width="904" height="148" alt="image" 
src="https://github.com/user-attachments/assets/68f352fa-f33b-4668-9ecc-7163dab8b756";
 />
   <img width="804" height="335" alt="image" 
src="https://github.com/user-attachments/assets/33d6a1b6-99ca-4e84-8104-8d3b2d6b19fe";
 />
   
   



-- 
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