ZENOTME commented on code in PR #386:
URL: https://github.com/apache/iceberg-rust/pull/386#discussion_r1620852535


##########
crates/iceberg/src/spec/datatypes.rs:
##########
@@ -118,6 +118,15 @@ impl Type {
         matches!(self, Type::Struct(_) | Type::List(_) | Type::Map(_))
     }
 
+    /// Convert Type to reference of PrimitiveType
+    pub fn as_primitive_type_ref(&self) -> Option<&PrimitiveType> {

Review Comment:
   LGTM. This is to align with the following `pub fn as_struct_type(self) -> 
Option<StructType>`. We need a new name if consider `as_` returns a ref, e.g. 
`pub fn as_struct_type_owned(self) -> Option<StructType>`.



-- 
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