Dandandan commented on code in PR #8862:
URL: https://github.com/apache/arrow-datafusion/pull/8862#discussion_r1452526321
##########
datafusion/physical-expr/src/string_expressions.rs:
##########
@@ -476,6 +520,24 @@ pub fn starts_with<T: OffsetSizeTrait>(args: &[ArrayRef])
-> Result<ArrayRef> {
Ok(Arc::new(result) as ArrayRef)
}
+/// Returns true if string ends with suffix.
+/// ends_with('alphabet', 'abet') = 't'
+pub fn ends_with<T: OffsetSizeTrait>(args: &[ArrayRef]) -> Result<ArrayRef> {
+ let string_array = as_generic_string_array::<T>(&args[0])?;
Review Comment:
We should be able to use
https://docs.rs/arrow/latest/arrow/compute/kernels/comparison/fn.ends_with.html
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]