/// Casts a `PrimitiveArray` to a different physical type and logical type.
/// This operation is `O(N)`
/// Values that do not fit in the new physical type are converted to nulls.
Casts a `PrimitiveArray` to a different physical type and logical type.
This operation is `O(N)`
Values that do not fit in the new physical type are converted to nulls.
Casts a ` PrimitiveArray ` to a different physical type and logical type . This operation is ` O ( N ) ` Values that do not fit in the new physical type are converted to nulls .
pub(crate) fn cast_physical<S, T>(arr: &PrimitiveArray<S::Native>, datatype: &DataType) -> ArrayRef
where
    S: PolarsNumericType,
    T: PolarsNumericType,
    T::Native: num::NumCast,
    S::Native: num::NumCast,
{
    let array =
        arrow::compute::cast::primitive_to_primitive::<_, T::Native>(arr, &datatype.to_arrow());
    Arc::new(array)
}
pub ( crate ) fn cast_physical < S , T > ( arr : & PrimitiveArray < S :: Native > , datatype : & DataType ) -> ArrayRef where S : PolarsNumericType , T : PolarsNumericType , T :: Native : num :: NumCast , S :: Native : num :: NumCast , { let array = arrow :: compute :: cast :: primitive_to_primitive :: < _ , T :: Native > ( arr , & datatype . to_arrow ( ) ) ; Arc :: new ( array ) }
Casts a `PrimitiveArray` to a different physical type and logical type.
Casts a ` PrimitiveArray ` to a different physical type and logical type .
arr
&PrimitiveArray<S::Native>
datatype
&DataType