kbendick commented on code in PR #5118:
URL: https://github.com/apache/iceberg/pull/5118#discussion_r907819165
##########
core/src/main/java/org/apache/iceberg/rest/CatalogHandlers.java:
##########
@@ -189,8 +194,12 @@ public static LoadTableResponse stageTableCreate(Catalog
catalog, Namespace name
location,
properties);
+ TableMetadata metadataWithLocation = TableMetadata.buildFrom(metadata)
+ .withMetadataLocation(metadataLocation)
+ .build();
+
return LoadTableResponse.builder()
- .withTableMetadata(metadata)
+ .withTableMetadata(metadataWithLocation)
Review Comment:
This change causes the number of tests in `TestRESTCatalog` that fail if we
require `metadataLocation` be non-null via the builder to go from 16 to 13.
If we remove that requirement from the builder, then all tests pass. Given
that we use `LoadTableResponse` in various places, I think we should drop the
requirement that `metadataLocation` be present at all times and allow for it to
be `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]