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



##########
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:
       Sorry, I wasn't very clear. If anything calls this, then it went through 
a path for normal identifiers. So I don't think that there is a need to worry 
about paths here because there isn't a way to pass a path in here.




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