diff --git a/crates/iceberg/public-api.txt b/crates/iceberg/public-api.txt index eb2d4f932b..0a980589f2 100644 --- a/crates/iceberg/public-api.txt +++ b/crates/iceberg/public-api.txt @@ -2078,7 +2078,7 @@ pub fn iceberg::spec::ManifestWriterBuilder::build_v2_data(self) -> iceberg::spe pub fn iceberg::spec::ManifestWriterBuilder::build_v2_deletes(self) -> iceberg::spec::ManifestWriter pub fn iceberg::spec::ManifestWriterBuilder::build_v3_data(self) -> iceberg::spec::ManifestWriter pub fn iceberg::spec::ManifestWriterBuilder::build_v3_deletes(self) -> iceberg::spec::ManifestWriter -pub fn iceberg::spec::ManifestWriterBuilder::new(output: iceberg::io::OutputFile, snapshot_id: core::option::Option, key_metadata: core::option::Option>, schema: iceberg::spec::SchemaRef, partition_spec: iceberg::spec::PartitionSpec) -> Self +pub fn iceberg::spec::ManifestWriterBuilder::new(output: iceberg::io::OutputFile, snapshot_id: core::option::Option, schema: iceberg::spec::SchemaRef, partition_spec: iceberg::spec::PartitionSpec) -> Self pub fn iceberg::spec::ManifestWriterBuilder::new_from_encrypted(encrypted_output: iceberg::encryption::EncryptedOutputFile, snapshot_id: core::option::Option, key_metadata: core::option::Option>, schema: iceberg::spec::SchemaRef, partition_spec: iceberg::spec::PartitionSpec) -> Self pub struct iceberg::spec::Map impl iceberg::spec::Map diff --git a/crates/iceberg/src/io/object_cache.rs b/crates/iceberg/src/io/object_cache.rs index d724c6ecda..9d7815569b 100644 --- a/crates/iceberg/src/io/object_cache.rs +++ b/crates/iceberg/src/io/object_cache.rs @@ -293,7 +293,6 @@ mod tests { let mut writer = ManifestWriterBuilder::new( self.next_manifest_file(), Some(current_snapshot.snapshot_id()), - None, current_schema.clone(), current_partition_spec.as_ref().clone(), ) diff --git a/crates/iceberg/src/scan/mod.rs b/crates/iceberg/src/scan/mod.rs index 368e8143e2..0c089be5a5 100644 --- a/crates/iceberg/src/scan/mod.rs +++ b/crates/iceberg/src/scan/mod.rs @@ -825,7 +825,6 @@ pub mod tests { let mut writer = ManifestWriterBuilder::new( self.next_manifest_file(), Some(current_snapshot.snapshot_id()), - None, current_schema.clone(), current_partition_spec.as_ref().clone(), ) @@ -1054,7 +1053,6 @@ pub mod tests { let mut writer = ManifestWriterBuilder::new( self.next_manifest_file(), Some(current_snapshot.snapshot_id()), - None, current_schema.clone(), current_partition_spec.as_ref().clone(), ) @@ -1165,7 +1163,6 @@ pub mod tests { let mut writer = ManifestWriterBuilder::new( self.next_manifest_file(), Some(current_snapshot.snapshot_id()), - None, current_schema.clone(), current_partition_spec.as_ref().clone(), ) @@ -1200,7 +1197,6 @@ pub mod tests { let mut writer = ManifestWriterBuilder::new( self.next_manifest_file(), Some(current_snapshot.snapshot_id()), - None, current_schema.clone(), current_partition_spec.as_ref().clone(), ) diff --git a/crates/iceberg/src/spec/manifest/mod.rs b/crates/iceberg/src/spec/manifest/mod.rs index fca753ecb2..4ba2645f51 100644 --- a/crates/iceberg/src/spec/manifest/mod.rs +++ b/crates/iceberg/src/spec/manifest/mod.rs @@ -270,7 +270,6 @@ mod tests { let mut writer = ManifestWriterBuilder::new( output_file, Some(1), - None, metadata.schema.clone(), metadata.partition_spec.clone(), ) @@ -572,7 +571,6 @@ mod tests { let mut writer = ManifestWriterBuilder::new( output_file, Some(2), - None, metadata.schema.clone(), metadata.partition_spec.clone(), ) @@ -669,7 +667,6 @@ mod tests { let mut writer = ManifestWriterBuilder::new( output_file, Some(3), - None, metadata.schema.clone(), metadata.partition_spec.clone(), ) @@ -778,7 +775,6 @@ mod tests { let mut writer = ManifestWriterBuilder::new( output_file, Some(2), - None, metadata.schema.clone(), metadata.partition_spec.clone(), ) @@ -886,7 +882,6 @@ mod tests { let mut writer = ManifestWriterBuilder::new( output_file, Some(2), - None, metadata.schema.clone(), metadata.partition_spec.clone(), ) @@ -1165,7 +1160,6 @@ mod tests { let mut writer = ManifestWriterBuilder::new( output_file, Some(1), - None, metadata.schema.clone(), metadata.partition_spec.clone(), ) diff --git a/crates/iceberg/src/spec/manifest/writer.rs b/crates/iceberg/src/spec/manifest/writer.rs index 88da1a396c..9fa2cc1c7a 100644 --- a/crates/iceberg/src/spec/manifest/writer.rs +++ b/crates/iceberg/src/spec/manifest/writer.rs @@ -56,11 +56,10 @@ pub struct ManifestWriterBuilder { } impl ManifestWriterBuilder { - /// Create a new builder. + /// Create a new builder for unencrypted manifests. pub fn new( output: OutputFile, snapshot_id: Option, - key_metadata: Option>, schema: SchemaRef, partition_spec: PartitionSpec, ) -> Self { @@ -69,7 +68,7 @@ impl ManifestWriterBuilder { writer_future: Box::pin(async move { output.writer().await }), location, snapshot_id, - key_metadata, + key_metadata: None, schema, partition_spec, } @@ -732,7 +731,6 @@ mod tests { let mut writer = ManifestWriterBuilder::new( output_file, Some(3), - None, metadata.schema.clone(), metadata.partition_spec.clone(), ) @@ -820,7 +818,6 @@ mod tests { let mut writer = ManifestWriterBuilder::new( output_file, Some(1), - None, schema.clone(), partition_spec.clone(), ) diff --git a/crates/iceberg/src/transaction/append.rs b/crates/iceberg/src/transaction/append.rs index 36fde117ab..01e7556e14 100644 --- a/crates/iceberg/src/transaction/append.rs +++ b/crates/iceberg/src/transaction/append.rs @@ -34,7 +34,6 @@ pub struct FastAppendAction { check_duplicate: bool, // below are properties used to create SnapshotProducer when commit commit_uuid: Option, - key_metadata: Option>, snapshot_properties: HashMap, added_data_files: Vec, } @@ -44,7 +43,6 @@ impl FastAppendAction { Self { check_duplicate: true, commit_uuid: None, - key_metadata: None, snapshot_properties: HashMap::default(), added_data_files: vec![], } @@ -68,12 +66,6 @@ impl FastAppendAction { self } - /// Set key metadata for manifest files. - pub fn set_key_metadata(mut self, key_metadata: Vec) -> Self { - self.key_metadata = Some(key_metadata); - self - } - /// Set snapshot summary properties. pub fn set_snapshot_properties(mut self, snapshot_properties: HashMap) -> Self { self.snapshot_properties = snapshot_properties; @@ -87,7 +79,6 @@ impl TransactionAction for FastAppendAction { let snapshot_producer = SnapshotProducer::new( table, self.commit_uuid.unwrap_or_else(Uuid::now_v7), - self.key_metadata.clone(), self.snapshot_properties.clone(), self.added_data_files.clone(), ); @@ -233,7 +224,6 @@ mod tests { let mut data_writer = ManifestWriterBuilder::new( next_manifest_file(&table_location_str), Some(current_snapshot.snapshot_id()), - None, schema.clone(), partition_spec.as_ref().clone(), ) @@ -263,7 +253,6 @@ mod tests { let mut delete_writer = ManifestWriterBuilder::new( next_manifest_file(&table_location_str), Some(current_snapshot.snapshot_id()), - None, schema.clone(), partition_spec.as_ref().clone(), ) diff --git a/crates/iceberg/src/transaction/snapshot.rs b/crates/iceberg/src/transaction/snapshot.rs index 8e47226072..1389e3e60e 100644 --- a/crates/iceberg/src/transaction/snapshot.rs +++ b/crates/iceberg/src/transaction/snapshot.rs @@ -113,7 +113,6 @@ pub(crate) struct SnapshotProducer<'a> { pub(crate) table: &'a Table, snapshot_id: i64, commit_uuid: Uuid, - key_metadata: Option>, snapshot_properties: HashMap, added_data_files: Vec, // A counter used to generate unique manifest file names. @@ -126,7 +125,6 @@ impl<'a> SnapshotProducer<'a> { pub(crate) fn new( table: &'a Table, commit_uuid: Uuid, - key_metadata: Option>, snapshot_properties: HashMap, added_data_files: Vec, ) -> Self { @@ -134,7 +132,6 @@ impl<'a> SnapshotProducer<'a> { table, snapshot_id: Self::generate_unique_snapshot_id(table), commit_uuid, - key_metadata, snapshot_properties, added_data_files, manifest_counter: (0..), @@ -255,7 +252,6 @@ impl<'a> SnapshotProducer<'a> { let builder = ManifestWriterBuilder::new( output_file, Some(self.snapshot_id), - self.key_metadata.clone(), self.table.metadata().current_schema().clone(), self.table .metadata()