polars-compute 0.53.0

Private compute kernels for the Polars DataFrame library
Documentation
1
2
3
4
5
6
7
8
9
use arrow::array::{Array, ArrayRef, BinaryViewArray, UInt32Array};
use arrow::datatypes::ArrowDataType;
use polars_buffer::Buffer;

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