rdblue commented on code in PR #5021:
URL: https://github.com/apache/iceberg/pull/5021#discussion_r936925981
##########
core/src/main/java/org/apache/iceberg/TableMetadata.java:
##########
@@ -1176,6 +1198,19 @@ public Builder removeBranch(String branch) {
return this;
}
+ public Builder setStatistics(String snapshotId, @Nullable StatisticsFile
statisticsFile) {
+ Preconditions.checkNotNull(snapshotId, "snapshotId is null");
+ Preconditions.checkNotNull(statisticsFile, "statisticsFile is null");
+ this.statistics.put(snapshotId, statisticsFile);
+ return this;
Review Comment:
If these methods don't add changes to the `changes` list, then the builder
won't recognize that anything has been updated and will return the original
metadata. This should be picked up by tests of the table metadata updates.
I think you should probably move the changes to this file (and change
additions) to a separate PR. We're going to need to add `MetadataUpdate` types
for this, and update the JSON parser for serializing those updates. That, and
testing everything. This is probably best separated from the API changes, which
can be done independently without an implementation.
--
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]