rymurr commented on a change in pull request #1843:
URL: https://github.com/apache/iceberg/pull/1843#discussion_r537385129
##########
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:
not sure how to identify a path here? Single element w/ '/' in it? Seems
arbitrary. The `HadoopCatalog` treats directory names as namespaces so there
would be no way to identify that here.
##########
File path: spark3/src/main/java/org/apache/iceberg/spark/SparkCatalog.java
##########
@@ -453,4 +520,5 @@ private static void commitChanges(Table table, SetProperty
setLocation, SetPrope
transaction.commitTransaction();
}
+
Review comment:
removed
----------------------------------------------------------------
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]