alamb commented on PR #4561:
URL: https://github.com/apache/arrow-rs/pull/4561#issuecomment-1661940270

   @tustvold  and I had some conversation about this PR that I wanted to add as 
context
   
   
   I believe this PR is a step forward because the way `DataType::List` is 
represented in arrow-rs  forces the user to pick a name for something that is 
essentially anonymous (`"item"`) is very confusing.
   
   So in my mind, it is a really bad user experience that users have know to 
cargo cult `"item"`. For example DataFusion copies `"item"` in several places:
   
   
https://github.com/search?q=repo%3Aapache%2Farrow-datafusion%20%5C%22item%5C%22&type=code
   
   
   I believe that @tustvold  is worried that hiding the details of 
`DataType::List` construction also hides the construction of the `Field` (and 
thus encourages use of the API that might lose field level metadata)
   
   While this is probably fine, it seems a bit incoherent to have some APIs in 
terms of DataType and some Field.
   
   I plan follow on PRs to:
   1. Clarify the documentation that `DataType::new_list` does not carry 
forward field metadata
   2. Try and add `Field::new_list_item` or something


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