nastra commented on code in PR #9620:
URL: https://github.com/apache/iceberg/pull/9620#discussion_r1478246464
##########
core/src/main/java/org/apache/iceberg/rest/RESTViewOperations.java:
##########
@@ -59,6 +60,8 @@ public void commit(ViewMetadata base, ViewMetadata metadata) {
// this is only used for replacing view metadata
Preconditions.checkState(base != null, "Invalid base metadata: null");
+ ViewUtil.verifyReplaceStrictness(base, metadata);
Review Comment:
The reason I haven't done this initially is because I quickly hacked
something together to outline the behavior, but it definitely can be done in
`ViewMetadata.Builder`.
Note that I've moved the check into the `build()` method instead of into
`addVersionInternal()` as we need to access the latest `properties` and we
don't want to accidentally not fail the check if `.setProperties(...)` is
called after `.setCurrentVersion(...)` on the builder
--
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]