diff --git a/crates/iceberg/src/spec/manifest.rs b/crates/iceberg/src/spec/manifest.rs index 13ecdc2e6..cf133332f 100644 --- a/crates/iceberg/src/spec/manifest.rs +++ b/crates/iceberg/src/spec/manifest.rs @@ -1223,6 +1223,8 @@ impl std::fmt::Display for DataFileFormat { } } +pub use _serde::DataFile as SerializableDataFile; + mod _serde { use std::collections::HashMap; @@ -1299,9 +1301,10 @@ mod _serde { } } + /// DataFile representation that can used to be serialize. #[serde_as] #[derive(Serialize, Deserialize)] - pub(super) struct DataFile { + pub struct DataFile { #[serde(default)] content: i32, file_path: String, @@ -1325,6 +1328,7 @@ mod _serde { } impl DataFile { + /// Create a serializable data file from a DataFile pub fn try_from( value: super::DataFile, partition_type: &StructType, @@ -1354,6 +1358,8 @@ mod _serde { sort_order_id: value.sort_order_id, }) } + + /// Convert a serializable data file back to DataFile pub fn try_into( self, partition_type: &StructType,