c-thiel commented on code in PR #2188:
URL: https://github.com/apache/iceberg-rust/pull/2188#discussion_r3232293077
##########
crates/iceberg/src/spec/table_metadata.rs:
##########
@@ -749,6 +750,15 @@ impl TableMetadata {
Ok(())
}
+
+ /// Validates that every type used across all schemas is supported by the
+ /// table's format version. Delegates to
[`Schema::check_format_compatibility`].
+ fn validate_schema_format_compatibility(&self) -> Result<()> {
+ for schema in self.schemas.values() {
Review Comment:
I originally added it to catch invalid metadata from buggy clients (e.g.
iceberg-rust before this PR, see my comment
https://github.com/apache/iceberg-rust/pull/2188#discussion_r2871247953).
Strictly speaking, since format versions only go up, an incompatible past
schema is invalid metadata — catching that is exactly what try_normalize is
for. But in practice it's a rare client-side bug, it costs us performance on
every metadata build, and it blocks loading metadata that someone might want to
fix.
Switched to validating only the current schema.
--
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]