kbendick commented on code in PR #5118:
URL: https://github.com/apache/iceberg/pull/5118#discussion_r908620992


##########
core/src/main/java/org/apache/iceberg/rest/responses/LoadTableResponse.java:
##########
@@ -89,8 +90,16 @@ private Builder() {
     }
 
     public Builder withTableMetadata(TableMetadata tableMetadata) {
-      this.metadataLocation = tableMetadata.metadataFileLocation();
       this.metadata = tableMetadata;
+      if (tableMetadata.metadataFileLocation() != null) {
+        this.metadataLocation = tableMetadata.metadataFileLocation();
+      }
+
+      return this;
+    }
+
+    public Builder withMetadataLocation(String metaLocation) {

Review Comment:
   I found myself having to create a new `TableMetadata` instance via the 
builder to pass in that had metadata location on it.
   
   Given that same builder pattern is used to add the metadata location to the 
`metadata` accessor in `LoadTableResult`, so I figured it would be convenient.
   
   Can remove it though.



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