xanderbailey commented on code in PR #3824:
URL: https://github.com/apache/iceberg-rust/pull/3824#discussion_r4803182103
##########
crates/iceberg/src/spec/table_metadata_builder.rs:
##########
@@ -1428,6 +1450,16 @@ impl TableMetadataBuilder {
Ok((fresh_spec, fresh_sort_order))
}
+ fn encryption_key_id(&self) -> Option<&String> {
+ // Pre-v3 tables can't be encrypted, and must be able to drop a stray
key ID.
+ if self.metadata.format_version < FormatVersion::V3 {
Review Comment:
`build()` rejects a v2 table with `encryption.key-id` on every commit, so
removing it is the only way to repair one. Without this gate the new remove
check would block that and leave the table stuck. Java doesn't need this
because it only checks compatibility at table creation.
--
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]