Is your feature request related to a problem or challenge? Please describe what you are trying to do.
While implement unnest in DataFusion for FixedSizeListArray (see apache/datafusion#6903) it turns out there is no support for FixedSizeListArray in the length kernel
https://docs.rs/arrow/latest/arrow/compute/kernels/length/fn.length.html
Describe the solution you'd like
While it sounds silly, I would like to Support FixedSizedListArray for length kernel
Specifically, it would be nice to get the NULLs handled correctly even though all the values will of course be the same (fixed!) size lenth
Here is a reproducer:
fn main() {
// Construct a value array
let value_data = ArrayData::builder(DataType::Int32)
.len(9)
.add_buffer(Buffer::from_slice_ref(&[0, 1, 2, 3, 4, 5, 6, 7, 8]))
.build()
.unwrap();
let list_data_type = DataType::FixedSizeList(
Arc::new(Field::new("item", DataType::Int32, false)),
3,
);
let nulls = NullBuffer::from(vec![true, false, true]);
let list_data = ArrayData::builder(list_data_type.clone())
.len(3)
.add_child_data(value_data.clone())
.nulls(Some(nulls))
.build()
.unwrap();
let list_array = FixedSizeListArray::from(list_data);
let lengths = arrow::compute::kernels::length::length(&list_array).unwrap();
println!("{}", pretty_format_columns("lengths", &[lengths]).unwrap());
}
It should print out [3, null, 3]
Describe alternatives you've considered
Additional context
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
While implement unnest in DataFusion for FixedSizeListArray (see apache/datafusion#6903) it turns out there is no support for
FixedSizeListArrayin thelengthkernelhttps://docs.rs/arrow/latest/arrow/compute/kernels/length/fn.length.html
Describe the solution you'd like
While it sounds silly, I would like to Support
FixedSizedListArrayforlengthkernelSpecifically, it would be nice to get the NULLs handled correctly even though all the values will of course be the same (fixed!) size lenth
Here is a reproducer:
It should print out
[3, null, 3]Describe alternatives you've considered
Additional context