sunchao commented on code in PR #3502:
URL: https://github.com/apache/arrow-rs/pull/3502#discussion_r1068459085
##########
arrow-string/src/like.rs:
##########
@@ -115,15 +169,34 @@ pub fn $fn_name(
}
}
}
-scalar_dyn_function!("LIKE", like_utf8_scalar_dyn, like_scalar);
-scalar_dyn_function!("NOT LIKE", nlike_utf8_scalar_dyn, nlike_scalar);
-scalar_dyn_function!("ILIKE", ilike_utf8_scalar_dyn, ilike_scalar);
-scalar_dyn_function!("NOT ILIKE", nilike_utf8_scalar_dyn, nilike_scalar);
+scalar_dyn_function!("left LIKE right", like_utf8_scalar_dyn, like_scalar);
+scalar_dyn_function!("left NOT LIKE right", nlike_utf8_scalar_dyn,
nlike_scalar);
+scalar_dyn_function!("left ILIKE right", ilike_utf8_scalar_dyn, ilike_scalar);
+scalar_dyn_function!(
+ "left NOT ILIKE right",
+ nilike_utf8_scalar_dyn,
+ nilike_scalar
+);
+scalar_dyn_function!(
+ "STARTSWITH(left, right)",
+ starts_with_utf8_scalar_dyn,
+ starts_with_scalar
+);
+scalar_dyn_function!(
+ "ENDSWITH(left, right)",
+ ends_with_utf8_scalar_dyn,
+ ends_with_scalar
+);
+scalar_dyn_function!(
+ "CONTAINS(left, right)",
+ contains_utf8_scalar_dyn,
+ contains_scalar
+);
macro_rules! dict_function {
- ($sql:tt, $fn_name:tt, $pat:tt, $neg:expr, $typ:tt) => {
+ ($sql:tt, $fn_name:tt, $fn_impl:tt) => {
-#[doc = concat!("Perform SQL `left ", $sql ," right` operation on on
[`DictionaryArray`] with values")]
+#[doc = concat!("Perform SQL `", $sql ,"` operation on on [`DictionaryArray`]
with values")]
Review Comment:
nit: there's an extra "on"
--
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]