rdblue commented on code in PR #5510:
URL: https://github.com/apache/iceberg/pull/5510#discussion_r950871655


##########
hive-metastore/src/main/java/org/apache/iceberg/hive/HiveCatalog.java:
##########
@@ -168,11 +169,16 @@ public boolean dropTable(TableIdentifier identifier, 
boolean purge) {
     String database = identifier.namespace().level(0);
 
     TableOperations ops = newTableOps(identifier);
-    TableMetadata lastMetadata;
-    if (purge && ops.current() != null) {
-      lastMetadata = ops.current();
-    } else {
-      lastMetadata = null;
+    TableMetadata lastMetadata = null;
+    try {
+      if (purge && ops.current() != null) {
+        lastMetadata = ops.current();
+      }
+    } catch (NotFoundException e) {
+      LOG.warn(
+          "Failed to load table metadata for table: {}, continuing drop 
without purge.",

Review Comment:
   Please removing ending puncutation. There's no need for it.



##########
hive-metastore/src/main/java/org/apache/iceberg/hive/HiveCatalog.java:
##########
@@ -168,11 +169,16 @@ public boolean dropTable(TableIdentifier identifier, 
boolean purge) {
     String database = identifier.namespace().level(0);
 
     TableOperations ops = newTableOps(identifier);
-    TableMetadata lastMetadata;
-    if (purge && ops.current() != null) {
-      lastMetadata = ops.current();
-    } else {
-      lastMetadata = null;
+    TableMetadata lastMetadata = null;
+    try {
+      if (purge && ops.current() != null) {
+        lastMetadata = ops.current();
+      }
+    } catch (NotFoundException e) {
+      LOG.warn(
+          "Failed to load table metadata for table: {}, continuing drop 
without purge.",

Review Comment:
   Please removing ending punctuation. There's no need for it.



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

Reply via email to