Function ends_with

Source
pub fn ends_with(
    left: &dyn Datum,
    right: &dyn Datum,
) -> Result<BooleanArray, ArrowError>
Expand description

Perform SQL ENDSWITH(left, right)

§Supported DataTypes

left and right must be the same type, and one of

  • Utf8
  • LargeUtf8
  • Utf8View
  • Binary
  • LargeBinary
  • BinaryView

§Example

let strings = StringArray::from(vec!["arrow-rs", "arrow-rs",  "Parquet"]);
let patterns = StringArray::from(vec!["arr", "-rs", "t"]);

let result = ends_with(&strings, &patterns).unwrap();
assert_eq!(result, BooleanArray::from(vec![false, true, true]));