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

   **Is your feature request related to a problem or challenge? Please describe 
what you are trying to do.**
   DataFusion handles structured types specially in some cases. It would be 
nice to have a function in `DataType` to detect this case such as 
`DataType::is_nested`
   
   Ideally it would follow a similar model to 
https://docs.rs/arrow/22.0.0/arrow/datatypes/enum.DataType.html#method.is_numeric
   
   **Describe the solution you'd like**
   I would like a function like `DataType::is_nested()` or something similar 
that returns true for `FixedSizeList`, `LargeList`, etc. I think the list is:
   
   ```rust
       !matches!(
           field.data_type(),
           DataType::List(_)
               | DataType::FixedSizeList(_, _)
               | DataType::LargeList(_)
               | DataType::Struct(_)
               | DataType::Union(_, _, _)
               | DataType::Map(_, _)
       )
   }
   ```
   
   **Describe alternatives you've considered**
   <!--
   A clear and concise description of any alternative solutions or features 
you've considered.
   -->
   
   **Additional context**
   See https://github.com/apache/arrow-datafusion/pull/3380/files#r967640804


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