rdblue commented on code in PR #7750:
URL: https://github.com/apache/iceberg/pull/7750#discussion_r1227349837
##########
core/src/main/java/org/apache/iceberg/rest/RESTTableOperations.java:
##########
@@ -101,30 +103,38 @@ public TableMetadata refresh() {
@Override
public void commit(TableMetadata base, TableMetadata metadata) {
- UpdateTableRequest.Builder requestBuilder;
- List<MetadataUpdate> baseChanges;
Consumer<ErrorResponse> errorHandler;
+ List<UpdateRequirement> requirements;
+ List<MetadataUpdate> updates;
switch (updateType) {
case CREATE:
Preconditions.checkState(
base == null, "Invalid base metadata for create transaction,
expected null: %s", base);
- requestBuilder = UpdateTableRequest.builderForCreate();
- baseChanges = createChanges;
+ updates =
+ ImmutableList.<MetadataUpdate>builder()
+ .addAll(createChanges)
+ .addAll(metadata.changes())
+ .build();
+ requirements = UpdateRequirements.forCreateTable(updates);
Review Comment:
Looks good!
--
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]