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


##########
core/src/main/java/org/apache/iceberg/BaseMetastoreTableOperations.java:
##########
@@ -333,6 +333,13 @@ protected CommitStatus checkCommitStatusStrict(String 
newMetadataLocation, Table
    */
   private boolean checkCurrentMetadataLocation(String newMetadataLocation) {
     TableMetadata metadata = refresh();
+    if (metadata == null) {
+      // the table does not exist in the catalog. this happens when a 
create-table commit fails
+      // before the table is persisted, in which case the new metadata 
location cannot be the
+      // current one or part of the table's history

Review Comment:
   This is too long
   
   ```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