Closed
Description
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
List
and Struct
datatypes have some ergonomic utility functions such as DataType::new_list
and Field::new_list
. LargeList
and FixedSizeList
should have these same utility functions.
Describe the solution you'd like
// this is verbose and annoying because of the `Arc::new` every time
let dtype = DataType::FixedSizeList(Arc::new(Field::new("item", DataType::Int8, true)), 2);
// this is better and it matches what's provided by `DataType::new_list`
let fsl_dtype = DataType::new_fixed_size_list(DataType::Int8, 2, true);
// should work on fields too
let fld = Field::new_fixed_size_list(
"f",
Field::new_list_field(DataType::Int32, false),
3,
false,
)
Describe alternatives you've considered
Additional context