manuzhang commented on code in PR #1169:
URL: https://github.com/apache/iceberg-cpp/pull/1169#discussion_r4749100618


##########
src/iceberg/table_metadata.cc:
##########
@@ -1398,9 +1437,10 @@ Result<std::vector<SnapshotLogEntry>> 
TableMetadataBuilder::Impl::UpdateSnapshot
 }
 
 Result<std::unique_ptr<TableMetadata>> TableMetadataBuilder::Impl::Build() {
-  // 1. Validate the format version.
+  // 1. Validate the format version and metadata consistency.
   
ICEBERG_PRECHECK(TableMetadata::IsSupportedFormatVersion(metadata_.format_version),
                    "Unsupported table format version: {}", 
metadata_.format_version);
+  ICEBERG_RETURN_UNEXPECTED(metadata_.Validate());

Review Comment:
   Thanks for raising the issue. I've opened 
https://github.com/apache/iceberg-cpp/issues/1199 to track and would like to 
fix it after a more thorough discussion.



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