mqy opened a new pull request #9011:
URL: https://github.com/apache/arrow/pull/9011


   I think this PR is a sub task of issue 
[ARROW-9777](https://issues.apache.org/jira/projects/ARROW/issues/ARROW-9777).
   Sorry had not seen this issue before I finished this PR.
   
   This PR is extracted from one of my dev branch, which has more changes for 
custom metadata. You may have a look at the [diff to arrow master]( 
https://github.com/apache/arrow/compare/master...mqy:custom-metadata).
   
   Two design choices:
   
   **Added a new type `CustomMetaData`** (alias to `BTreeMap`), in 
datatypes.rs. 
   
   Why `BTreeMap` instead of `HashMap`? Because of `Field` implements traits 
`Hash`, `PartialOrd`, and `Ord`,
   but `HashMap` breaks the behavior.
   
   **Additional refactoring**
   
   It tends to be tedious when add more args, for example: 
   try_new, try_new_with_options, try_new_with_options_and_custom_metadata.
   
   Finally, I refactored several functions according to [builder 
pattern](https://doc.rust-lang.org/1.0.0/style/ownership/builders.html). Sorry 
that, this refactoring may introduce some inconveniences.
   


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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to