c-thiel commented on code in PR #1362:
URL: https://github.com/apache/iceberg-rust/pull/1362#discussion_r2140985694


##########
crates/iceberg/src/spec/table_metadata.rs:
##########
@@ -654,6 +670,33 @@ impl TableMetadata {
     }
 }
 
+/// Unnormalized table metadata, used as an intermediate type
+/// to build table metadata in a declarative way.
+#[derive(Debug, PartialEq, Deserialize, Eq, Clone)]
+pub struct UnnormalizedTableMetadata(TableMetadata);
+
+impl UnnormalizedTableMetadata {
+    /// Try to normalize the table metadata.
+    pub fn try_normalize(self) -> Result<TableMetadata> {
+        let mut metadata = self.0;
+        metadata.try_normalize()?;
+        Ok(metadata)
+    }
+}
+
+impl UnnormalizedTableMetadata {
+    /// Build a new [`UnnormalizedTableMetadata`] using the 
[`TableMetadataDeclarativeBuilder`].
+    pub fn builder() -> TableMetadataDeclarativeBuilder {

Review Comment:
   This is a library and the constructor can be used outside of the crate. I 
like to attach some constructor to a type if available.
   As it's an auxiliary type, I am OK with removing it as well.



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to