Skip to content

Commit

Permalink
collect directly into buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-beedie committed Jul 30, 2024
1 parent 33e3711 commit cab0b51
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions crates/polars-arrow/src/legacy/kernels/binary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ use crate::buffer::Buffer;
use crate::datatypes::ArrowDataType;

pub fn binary_size_bytes(array: &BinaryViewArray) -> ArrayRef {
let values = array.len_iter().collect::<Vec<_>>();
let values: Buffer<_> = values.into();
let values: Buffer<_> = array.len_iter().collect();
let array = UInt32Array::new(ArrowDataType::UInt32, values, array.validity().cloned());
Box::new(array)
}

0 comments on commit cab0b51

Please sign in to comment.