alamb opened a new issue, #1934:
URL: https://github.com/apache/arrow-rs/issues/1934

   **Is your feature request related to a problem or challenge? Please describe 
what you are trying to do.**:
   I want to make a field Nullable as part of outer joins creation in DataFusion
   
   I would like a builder style API so I can write code like
   
   ```rust
   let field = old_field.clone()
     .with_nullable(force_nullable)
   ```
   
   but instead I have to write
   
   ```rust
       if force_nullable {
           Field::new(
               old_field.name(),
               old_field.data_type().clone(),
               true
           )
       } else {
           old_field.clone()
       }
   ```
   
   **Describe the solution you'd like**
   Ideally we could add functions to 
https://docs.rs/arrow/16.0.0/arrow/datatypes/struct.Field.html
   
   ```rust
   impl Field {
     pub fn with_nullable(mut self, nullable: bool) -> Self {
      .. 
     }
     pub fn with_dict_id(mut self, dict_id: i64) -> Self {
      .. 
     }
     pub fn with_data_type(mut self, data_type: DataType) -> Self {
      .. 
     }
     pub fn with_dict_is_ordered(mut self, dict_is_ordered: Option<bool>) -> 
Self {
      .. 
     }
   }
   ```
   
   
   **Describe alternatives you've considered**
   A clear and concise description of any alternative solutions or features 
you've considered.
   
   **Additional context**
   Add any other context or screenshots about the feature request here.
   


-- 
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-unsubscr...@arrow.apache.org.apache.org

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

Reply via email to