You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "tustvold (via GitHub)" <gi...@apache.org> on 2023/03/27 10:38:24 UTC

[GitHub] [arrow-rs] tustvold commented on a diff in pull request #3944: feat: enable metadata import/export through C data interface

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


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

Review Comment:
   ```suggestion
           metadata: &HashMap<String, String>,
   ```
   
   The option seems a touch redundant, could also consider parameterising this to be something like
   
   ```
   pub fn with_metadata<I, S>(mut self, metadata: I) -> Result<Self, ArrowError> where I: IntoIterator<Item=(S, S)>, S: AsRef<str>
   ```



-- 
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: github-unsubscribe@arrow.apache.org

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