tlm365 commented on code in PR #6376:
URL: https://github.com/apache/arrow-rs/pull/6376#discussion_r1751980921


##########
arrow-string/src/regexp.rs:
##########
@@ -591,40 +604,103 @@ mod tests {
 
     test_flag_utf8!(
         test_utf8_array_regexp_is_match,
-        vec!["arrow", "arrow", "arrow", "arrow", "arrow", "arrow"],
-        vec!["^ar", "^AR", "ow$", "OW$", "foo", ""],
-        regexp_is_match_utf8,
+        StringArray::from(vec!["arrow", "arrow", "arrow", "arrow", "arrow", 
"arrow"]),
+        StringArray::from(vec!["^ar", "^AR", "ow$", "OW$", "foo", ""]),
+        regexp_is_match_utf8::<
+            GenericStringArray<i32>,
+            GenericStringArray<i32>,
+            GenericStringArray<i32>,
+        >,
+        [true, false, true, false, false, true]
+    );
+    test_flag_utf8!(
+        test_utf8_array_regexp_is_match_2,
+        StringViewArray::from(vec!["arrow", "arrow", "arrow", "arrow", 
"arrow", "arrow"]),
+        StringViewArray::from(vec!["^ar", "^AR", "ow$", "OW$", "foo", ""]),
+        regexp_is_match_utf8::<StringViewArray, StringViewArray, 
StringViewArray>,
         [true, false, true, false, false, true]
     );
+    test_flag_utf8!(
+        test_utf8_array_regexp_is_match_3,
+        StringViewArray::from(vec!["arrow", "arrow", "arrow", "arrow", 
"arrow", "arrow"]),
+        StringArray::from(vec!["^ar", "^AR", "ow$", "OW$", "foo", ""]),
+        regexp_is_match_utf8::<StringViewArray, GenericStringArray<i32>, 
GenericStringArray<i32>>,
+        [true, false, true, false, false, true]
+    );
+
     test_flag_utf8!(
         test_utf8_array_regexp_is_match_insensitive,
-        vec!["arrow", "arrow", "arrow", "arrow", "arrow", "arrow"],
-        vec!["^ar", "^AR", "ow$", "OW$", "foo", ""],
-        vec!["i"; 6],
-        regexp_is_match_utf8,
+        StringArray::from(vec!["arrow", "arrow", "arrow", "arrow", "arrow", 
"arrow"]),
+        StringArray::from(vec!["^ar", "^AR", "ow$", "OW$", "foo", ""]),
+        StringArray::from(vec!["i"; 6]),
+        regexp_is_match_utf8::<
+            GenericStringArray<i32>,
+            GenericStringArray<i32>,
+            GenericStringArray<i32>,
+        >,
+        [true, true, true, true, false, true]
+    );
+    test_flag_utf8!(
+        test_utf8_array_regexp_is_match_insensitive_2,
+        StringViewArray::from(vec!["arrow", "arrow", "arrow", "arrow", 
"arrow", "arrow"]),

Review Comment:
   @alamb Thanks for reviewing. I'm willing to add benchmark for this one.
   
   > Can you please add tests that have some strings that are longer than 12 
bytes?
   
   Yes, noted. I will review and update test cases for this scenario.



-- 
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: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to