github-actions[bot] commented on code in PR #70397:
URL: https://github.com/apache/doris/pull/70397#discussion_r4548017673


##########
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:
   [P2] Preserve canonical external table case in the lookup key
   
   With global `lower_case_table_names=1` and an external catalog overriding it 
to `0` or `2`, `BaseTableInfo(table)` registers a canonical name such as 
`lake.db.MixedCase`. `TableNameInfo` here lowercases it to `mixedcase` using 
the global mode, so both dependency lookups miss. For example, an Iceberg 
INSERT reaches this callback through the typed post-commit refresh without a 
database-wide callback, leaving both dependent MV rewrite-plan caches and their 
generation unchanged. Build the key from the supplied canonical names without 
applying `TableNameInfo` normalization, and cover differing global/catalog 
modes in the invalidation test.



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