henrib commented on code in PR #5145:
URL: https://github.com/apache/hive/pull/5145#discussion_r1850378912


##########
iceberg/iceberg-catalog/src/main/java/org/apache/iceberg/hive/HiveTableOperations.java:
##########
@@ -143,11 +149,15 @@ public FileIO io() {
   protected void doRefresh() {
     String metadataLocation = null;
     try {
-      Table table = metaClients.run(client -> client.getTable(database, 
tableName));
-      HiveOperationsBase.validateTableIsIceberg(table, fullName);
-
-      metadataLocation = table.getParameters().get(METADATA_LOCATION_PROP);
-
+      Table table = actor.getTable(database, tableName);
+      if (table != null) {
+        HiveOperationsBase.validateTableIsIceberg(table, fullName);
+        metadataLocation = table.getParameters().get(METADATA_LOCATION_PROP);
+      } else {
+        if (currentMetadataLocation() != null) {
+          throw new NoSuchTableException("No such table: %s.%s", database, 
tableName);
+        }

Review Comment:
   If the getTable returns null instead of throwing an exception when the table 
can not be found....



-- 
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: gitbox-unsubscr...@hive.apache.org

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


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

Reply via email to