albertlockett commented on code in PR #9871:
URL: https://github.com/apache/arrow-rs/pull/9871#discussion_r3174251941
##########
arrow-string/src/like.rs:
##########
@@ -187,6 +189,30 @@ pub fn contains(left: &dyn Datum, right: &dyn Datum) ->
Result<BooleanArray, Arr
like_op(Op::Contains, left, right)
}
+/// Perform equality check on two byte arrays using an ASCII case-insensitive
match.
+///
+/// `left` and `right` must be the same type, and one of
+/// - Utf8
+/// - LargeUtf8
+/// - Utf8View
+///
+/// # Example
+/// ```
+/// # use arrow_array::{StringArray, BooleanArray};
+/// # use arrow_string::like::eq_ignore_ascii_case;
+/// let strings = StringArray::from(vec!["arrow", "rs", "arrow-rS",
"Parquet"]);
+/// let patterns = StringArray::from(vec!["ARROW", "rS", "ARROW-rs", "arrow"]);
+///
+/// let result = eq_ignore_ascii_case(&strings, &patterns).unwrap();
+/// assert_eq!(result, BooleanArray::from(vec![true, true, true, false]));
+/// ```
+pub fn eq_ignore_ascii_case(
Review Comment:
I'm hoping like is the correct module to add this function?
I added it here because I wanted to reuse a lot of the machinery that was
already in place to invoke the `Predicate`, but I was hesitating because this
does not have an equivalent SQL function, unlike the other functions/Operator
variants in this module.
--
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]