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

   **Is your feature request related to a problem or challenge? Please describe 
what you are trying to do.**
   
   The embedded field type of a List must always be called "item" -- you can 
see this is done everywhere in the arrow-rs codebase that a `DataType::List` is 
created: 
https://github.com/search?q=repo%3Aapache%2Farrow-rs+%22%5C%22item%5C%22%22&type=code
   
   While working on https://github.com/influxdata/influxdb_iox/pull/8247 I had 
to make this change
   
   ```diff
   -       DataType::List(Arc::new(Field::new("state", dt.clone(), false))),
   +       DataType::List(Arc::new(Field::new("item", dt.clone(), true))),
   ```
   
   to align the type with expected
   
   Having to do this is both verbose/annoying but more to the point means we 
are exposing some sort of implementation detail that must be 
[cargo-culted](https://en.wikipedia.org/wiki/Cargo_cult_programming) in many 
places  
   
   **Describe the solution you'd like**
   I would like a method like this (with good documentation) to create a 
   
   ```rust
   let dt = DataType::new_list(DataType::Float64, true);
   ```
   
   That would do the same thing as 
   
   ```rust
   let df = DataType::List(Arc::new(Field::new("item", DataType::Float64, 
true))),
   ```
   
   cc @tustvold for your thoughts
   
   
   **Describe alternatives you've considered**
   Do nothing
   
   **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: [email protected]

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

Reply via email to