Function smartnoise_runtime::components::cast::cast_int [−][src]
pub fn cast_int(
data: &Array,
lower: Integer,
upper: Integer
) -> Result<ArrayD<Integer>>
Cast data to type i64.
If data are bool, map true => 1 and false => 0
If data are String, attempt to parse as i64 and impute a uniform i64 between lower and upper otherwise.
If data are f64, round non-NAN values to their i64 representation,
impute uniform i64 between lower and upper for values that are NAN.
Arguments
data- Data to be cast toi64.lower- Minimum allowable imputation value.upper- Maximum allowable imputation value.
Return
Data cast to i64.