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


##########
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:
   ```suggestion
       pub fn as_primitive_type(&self) -> Option<&PrimitiveType> {
   ```
   I think in rust `as_` usually returns a ref, so this would be enough?



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

Reply via email to