kbendick commented on a change in pull request #3072:
URL: https://github.com/apache/iceberg/pull/3072#discussion_r703783319



##########
File path: 
spark3/src/main/java/org/apache/iceberg/spark/SparkSessionCatalog.java
##########
@@ -121,6 +121,15 @@ public Table loadTable(Identifier ident) throws 
NoSuchTableException {
     }
   }
 
+  @Override
+  public void invalidateTable(Identifier ident) {
+    if (icebergCatalog.tableExists(ident)) {
+      icebergCatalog.invalidateTable(ident);
+    } else {
+      getSessionCatalog().invalidateTable(ident);
+    }

Review comment:
       Nit / non-blocking: Is there any need to check if the `Identifier` 
belongs to the catalog of `icebergCatalog`? I doubt it because tableExists 
should be checking that, but if there's no test around that might consider 
adding one (or just trying it out).




-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to