rdblue commented on code in PR #8608:
URL: https://github.com/apache/iceberg/pull/8608#discussion_r1333527192


##########
core/src/main/java/org/apache/iceberg/view/ViewMetadata.java:
##########
@@ -375,6 +386,13 @@ public ViewMetadata build() {
       Preconditions.checkArgument(null != location, "Invalid location: null");
       Preconditions.checkArgument(versions.size() > 0, "Invalid view: no 
versions were added");
 
+      // when associated with a metadata file, metadata must have no changes 
so that the metadata
+      // matches exactly what is in the metadata file, which does not store 
changes. metadata
+      // location with changes is inconsistent.
+      Preconditions.checkArgument(

Review Comment:
   I agree with placing this here, although I would note that there's no way to 
read changes using `ViewMetadataParser`, so that should always produce metadata 
with a location but no changes. That means even if we did the check in 
`ViewMetadata`, we wouldn't expect a problem.



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