-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
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:
!matches!(
field.data_type(),
DataType::List(_)
| DataType::FixedSizeList(_, _)
| DataType::LargeList(_)
| DataType::Struct(_)
| DataType::Union(_, _, _)
| DataType::Map(_, _)
)
}Describe alternatives you've considered
Additional context
See https://github.com/apache/arrow-datafusion/pull/3380/files#r967640804