You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/08/20 07:21:17 UTC

[GitHub] [iceberg] szehon-ho commented on a diff in pull request #5510: Support delete corrupted Iceberg table

szehon-ho commented on code in PR #5510:
URL: https://github.com/apache/iceberg/pull/5510#discussion_r950661835


##########
hive-metastore/src/main/java/org/apache/iceberg/hive/HiveCatalog.java:
##########
@@ -169,9 +170,14 @@ public boolean dropTable(TableIdentifier identifier, boolean purge) {
 
     TableOperations ops = newTableOps(identifier);
     TableMetadata lastMetadata;
-    if (purge && ops.current() != null) {
-      lastMetadata = ops.current();
-    } else {
+    try {
+      if (purge && ops.current() != null) {
+        lastMetadata = ops.current();
+      } else {
+        lastMetadata = null;

Review Comment:
   Style nit: Wondering, while we are in this code, it may be a bit more concise to initialize lastMetadata = null, then we can remove two null assignments in the else/catch blocks?  Not sure what people think, though its not a big in any case.



-- 
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: issues-unsubscribe@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org