judahrand commented on code in PR #5862:
URL: https://github.com/apache/arrow-rs/pull/5862#discussion_r1634841928
##########
arrow-data/src/transform/mod.rs:
##########
@@ -320,6 +320,11 @@ pub enum Capacities {
/// * the capacity of the array offsets
/// * the capacity of the child data
List(usize, Option<Box<Capacities>>),
+ /// FixedSizeList data type
+ /// Define
+ /// * the capacity of the array
+ /// * the capacity of the child data
+ FixedSizeList(usize, Option<Box<Capacities>>),
Review Comment:
https://github.com/apache/arrow-rs/pull/5862/commits/81a45d8ec6dc62db6bab22466c23f340858aa885
##########
arrow-data/src/transform/mod.rs:
##########
@@ -506,7 +515,18 @@ impl<'a> MutableArrayData<'a> {
.iter()
.map(|array| &array.child_data()[0])
.collect::<Vec<_>>();
- vec![MutableArrayData::new(children, use_nulls,
array_capacity)]
+ let capacities =
+ if let Capacities::FixedSizeList(capacity, ref
child_capacities) = capacities {
+ child_capacities
+ .clone()
+ .map(|c| *c)
+ .unwrap_or(Capacities::Array(capacity))
+ } else {
+ Capacities::Array(array_capacity)
Review Comment:
https://github.com/apache/arrow-rs/pull/5862/commits/86fb18f8cb312e7060ff8ae7768a00ecde67f067
--
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]