Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions arrow-cast/src/cast/run_array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,9 @@ pub(crate) fn cast_to_run_end_encoded<K: RunEndIndexType>(

// Partition the array to identify runs of consecutive equal values
let partitions = partition(&[Arc::clone(cast_array)])?;
let mut run_ends = Vec::new();
let mut values_indexes = Vec::new();
let size = partitions.len();
let mut run_ends = Vec::with_capacity(size);
let mut values_indexes = Vec::with_capacity(size);
let mut last_partition_end = 0;
for partition in partitions.ranges() {
values_indexes.push(last_partition_end);
Expand Down
Loading