This is an automated email from the ASF dual-hosted git repository.

lzljs3620320 pushed a commit to branch release-1.0
in repository https://gitbox.apache.org/repos/asf/paimon.git

commit 481756018d3be7d2ba87228a98ba1e07a50d05e5
Author: XiaoHongbo <[email protected]>
AuthorDate: Mon Jan 13 14:58:07 2025 +0800

    [core] Fix invalidate tables with same tableNames in other db issue (#4895)
---
 .../src/main/java/org/apache/paimon/catalog/CachingCatalog.java        | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/paimon-core/src/main/java/org/apache/paimon/catalog/CachingCatalog.java 
b/paimon-core/src/main/java/org/apache/paimon/catalog/CachingCatalog.java
index 4796276972..4113929856 100644
--- a/paimon-core/src/main/java/org/apache/paimon/catalog/CachingCatalog.java
+++ b/paimon-core/src/main/java/org/apache/paimon/catalog/CachingCatalog.java
@@ -202,7 +202,8 @@ public class CachingCatalog extends DelegateCatalog {
 
         // clear all branch tables of this table
         for (Identifier i : tableCache.asMap().keySet()) {
-            if (identifier.getTableName().equals(i.getTableName())) {
+            if (identifier.getTableName().equals(i.getTableName())
+                    && 
identifier.getDatabaseName().equals(i.getDatabaseName())) {
                 tableCache.invalidate(i);
             }
         }

Reply via email to