wjones127 commented on code in PR #3944:
URL: https://github.com/apache/arrow-rs/pull/3944#discussion_r1149951475


##########
arrow-schema/src/ffi.rs:
##########
@@ -152,6 +157,46 @@ impl FFI_ArrowSchema {
         Ok(self)
     }
 
+    pub fn with_metadata(
+        mut self,
+        metadata: Option<&HashMap<String, String>>,
+    ) -> Result<Self, ArrowError> {
+        let new_metadata = if let Some(metadata) = metadata {
+            if !metadata.is_empty() {
+                let mut metadata_serialized: Vec<u8> = Vec::new();
+                metadata_serialized.extend((metadata.len() as 
i32).to_ne_bytes());
+
+                for (key, value) in metadata.iter() {
+                    let key_len = key.len() as i32;
+                    let value_len = value.len() as i32;

Review Comment:
   I can't imagine this will ever come up as an issue. I'm also inferring from 
the fact that there's no conversion trait from the `TryFrom` associated error 
to `ArrowError` this isn't commonly handled elsewhere in the codebase.



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

Reply via email to