arrow::compute::kernels::cast_utils

Function parse_decimal

pub fn parse_decimal<T>(
    s: &str,
    precision: u8,
    scale: i8,
) -> Result<<T as ArrowPrimitiveType>::Native, ArrowError>
where T: DecimalType,
Expand description

Parse the string format decimal value to i128/i256 format and checking the precision and scale. The result value can’t be out of bounds.