fn ends_with<T: StringOffsetSizeTrait>(args: &[ArrayRef]) -> Result<BooleanArray> {
    if args[0].is_null(0) || args[1].is_null(1) {
        return Ok(BooleanArray::from(vec![None]));
    }

    let string_array = downcast_string_arg!(args[0], "string", T);
    let suffix_array = downcast_string_arg!(args[1], "suffix", T);
    let suffix = suffix_array.value(0);

    let result = string_array
        .iter()
        .map(|string| string.map(|string: &str| string.ends_with(suffix)))
        .collect::<BooleanArray>();
    Ok(result)
}
/// Returns true if string ends with prefix.
/// endsWith('alphabet', 'alph') = 't'
Returns true if string ends with prefix.
Returns true if string ends with prefix .
fn ends_with<T: StringOffsetSizeTrait>(args: &[ArrayRef]) -> Result<BooleanArray> {
    if args[0].is_null(0) || args[1].is_null(1) {
        return Ok(BooleanArray::from(vec![None]));
    }
    let string_array = downcast_string_arg!(args[0], "string", T);
    let suffix_array = downcast_string_arg!(args[1], "suffix", T);
    let suffix = suffix_array.value(0);
    let result = string_array
        .iter()
        .map(|string| string.map(|string: &str| string.ends_with(suffix)))
        .collect::<BooleanArray>();
    Ok(result)
}
fn ends_with < T : StringOffsetSizeTrait > ( args : & [ ArrayRef ] ) -> Result < BooleanArray > { if args [ 0 ] . is_null ( 0 ) || args [ 1 ] . is_null ( 1 ) { return Ok ( BooleanArray :: from ( vec ! [ None ] ) ) ; } let string_array = downcast_string_arg ! ( args [ 0 ] " " T ) ; let suffix_array = downcast_string_arg ! ( args [ 1 ] " " T ) ; let suffix = suffix_array . value ( 0 ) ; let result = string_array . iter ( ) . map ( | string | string . map ( | string : & str | string . ends_with ( suffix ) ) ) . collect :: < BooleanArray > ( ) ; Ok ( result ) }
Returns true if string ends with prefix.
Returns true if string ends with prefix .
args
&[ArrayRef]
args
&[ArrayRef]