smallx commented on a change in pull request #3837:
URL: https://github.com/apache/iceberg/pull/3837#discussion_r780432371



##########
File path: 
spark/v3.0/spark/src/main/java/org/apache/iceberg/spark/SparkCatalog.java
##########
@@ -272,6 +273,17 @@ public void invalidateTable(Identifier ident) {
       load(ident).first().refresh();
     } catch (org.apache.iceberg.exceptions.NoSuchTableException ignored) {
       // ignore if the table doesn't exist, it is not cached
+    } catch (TableUUIDMismatchException e) {
+      try {
+        if (cacheEnabled && !isPathIdentifier(ident)) {
+          ((CachingCatalog) icebergCatalog).invalidate(buildIdentifier(ident));
+          load(ident);
+        } else {
+          throw e;
+        }
+      } catch (org.apache.iceberg.exceptions.NoSuchTableException ignored) {
+        // ignore if the table doesn't exist, it is not cached
+      }

Review comment:
       Fixed. Thanks @kbendick 




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