yabola commented on code in PR #5327:
URL: https://github.com/apache/iceberg/pull/5327#discussion_r929432379


##########
hive-metastore/src/main/java/org/apache/iceberg/hive/HiveTableOperations.java:
##########
@@ -215,8 +215,9 @@ protected void doRefresh() {
   @SuppressWarnings("checkstyle:CyclomaticComplexity")
   @Override
   protected void doCommit(TableMetadata base, TableMetadata metadata) {
-    String newMetadataLocation = base == null && 
metadata.metadataFileLocation() != null ?
-        metadata.metadataFileLocation() : writeNewMetadata(metadata, 
currentVersion() + 1);
+    boolean isTableForRegister = metadata.isForRegister();
+    String newMetadataLocation = isTableForRegister ? 
metadata.metadataFileLocation()

Review Comment:
   Will not be null, only `registerTable` will take this value, the 
`registerTable` method has ensured that it is not null



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