924060929 commented on code in PR #70398:
URL: https://github.com/apache/doris/pull/70398#discussion_r4547755585


##########
fe/fe-core/src/main/java/org/apache/doris/mtmv/MTMVRelationManager.java:
##########
@@ -79,6 +83,45 @@ public Set<BaseTableInfo> getMtmvsByBaseView(BaseTableInfo 
table) {
         return viewMTMVs.getOrDefault(table, ImmutableSet.of());
     }
 
+    /** Only discard local rewrite plans; replay must not refresh an MV or 
load external metadata. */
+    public void invalidateRewriteCaches(String catalog, String db, String 
table) {
+        Set<BaseTableInfo> affected = Sets.newHashSet();
+        if (table != null) {
+            BaseTableInfo base = new BaseTableInfo(new TableNameInfo(catalog, 
db, table));

Review Comment:
   Fixed in 44e6c2e79ec0b3dee84c9dc12d8cd7a123b31a8c, with the same repair 
applied to branch-4.1 in a713b8585cb2491c295421fd34e85935bebfae9d. The lookup 
now constructs BaseTableInfo directly from canonical metadata names and 
bypasses TableNameInfo's global SQL-name normalization. Added a regression for 
canonical Orders with an external catalog retaining mixed case and global 
normalization enabled/disabled. The enabled case retained both stale rewrite 
caches before the fix and now clears both. Validation on each branch: 72 
focused FE tests passed, ./build.sh --fe passed (UI disabled), and Checkstyle 
reported zero violations.



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