Skip to content

Commit

Permalink
Use correct default capacities
Browse files Browse the repository at this point in the history
  • Loading branch information
judahrand committed Jun 11, 2024
1 parent fcbdea6 commit 69c1588
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions arrow-data/src/transform/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ impl<'a> MutableArrayData<'a> {
MutableArrayData::new(value_child, use_nulls, array_capacity),
]
}
DataType::FixedSizeList(_, _) => {
DataType::FixedSizeList(_, size) => {
let children = arrays
.iter()
.map(|array| &array.child_data()[0])
Expand All @@ -519,9 +519,9 @@ impl<'a> MutableArrayData<'a> {
child_capacities
.clone()
.map(|c| *c)
.unwrap_or(Capacities::Array(capacity))
.unwrap_or(Capacities::Array(capacity * *size as usize))
} else {
Capacities::Array(array_capacity)
Capacities::Array(array_capacity * *size as usize)
};
vec![MutableArrayData::with_capacities(
children, use_nulls, capacities,
Expand Down

0 comments on commit 69c1588

Please sign in to comment.