rymurr commented on a change in pull request #1843:
URL: https://github.com/apache/iceberg/pull/1843#discussion_r537765366



##########
File path: spark3/src/main/java/org/apache/iceberg/spark/SparkCatalog.java
##########
@@ -268,14 +329,19 @@ public void renameTable(Identifier from, Identifier to) 
throws NoSuchTableExcept
   @Override
   public void invalidateTable(Identifier ident) {
     try {
-      icebergCatalog.loadTable(buildIdentifier(ident)).refresh();
+      TableIdentifier tableIdentifier = buildIdentifier(ident);
+      Table table = isPathIdentifier(ident) ?
+          tables.load(tableIdentifier.name()) :
+          icebergCatalog.loadTable(tableIdentifier);
+      table.refresh();
     } catch (org.apache.iceberg.exceptions.NoSuchTableException ignored) {
       // ignore if the table doesn't exist, it is not cached
     }
   }
 
   @Override
   public Identifier[] listTables(String[] namespace) {
+    // no way to identify if this is a path and we should use tables instead 
of catalog.

Review comment:
       Ah I see, have removed the comment.




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

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