RussellSpitzer commented on a change in pull request #3072:
URL: https://github.com/apache/iceberg/pull/3072#discussion_r703798529
##########
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:
It's basically the same as the "loadTable" method in this class.
TableExists just catches the noSuchTable exception and returns false
https://github.com/apache/iceberg/blob/b623b074c6242ac3b48fce8712dedd7f97e6ee5b/api/src/main/java/org/apache/iceberg/catalog/Catalog.java#L268-L275
So I don't really think we need a check here. Again it's basically the same
logic for "loadTable" so if loadTable would touch this table in the Iceberg
catalog, refresh table will also use the Iceberg table.
--
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]