pvary commented on code in PR #17464:
URL: https://github.com/apache/iceberg/pull/17464#discussion_r3956093009


##########
hive-metastore/src/main/java/org/apache/iceberg/hive/HiveViewOperations.java:
##########
@@ -276,6 +276,13 @@ public void doCommit(ViewMetadata base, ViewMetadata 
metadata) {
    */
   private boolean checkCurrentMetadataLocation(String newMetadataLocation) {
     ViewMetadata metadata = refresh();
+    if (metadata == null) {
+      // the view does not exist in the catalog. this happens when a 
create-view commit fails
+      // before the view is persisted, in which case the new metadata location 
cannot be the
+      // current one

Review Comment:
   ```suggestion
         // Table creation may not have registered metadata yet.
   ```



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