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


##########
arrow-string/src/regexp.rs:
##########
@@ -107,18 +116,22 @@ pub fn regexp_is_match_utf8<OffsetSize: OffsetSizeTrait>(
             .nulls(nulls)
             .build_unchecked()
     };
+
     Ok(BooleanArray::from(data))
 }
 
-/// Perform SQL `array ~ regex_array` operation on [`StringArray`] /
-/// [`LargeStringArray`] and a scalar.
+/// Perform SQL `array ~ regex_array` operation on
+/// [`StringArray`] / [`LargeStringArray`] / [`StringViewArray`] and a scalar.
 ///
 /// See the documentation on [`regexp_is_match_utf8`] for more details.
-pub fn regexp_is_match_utf8_scalar<OffsetSize: OffsetSizeTrait>(
-    array: &GenericStringArray<OffsetSize>,
+pub fn regexp_is_match_utf8_scalar<'a, S>(

Review Comment:
   I have an idea of how to update this PR to avoid an API change -- the reason 
this is important is that a breaking API change would need to wait until the 
next major release (Dec 2024) per the release schedule: 
https://github.com/apache/arrow-rs?tab=readme-ov-file#release-versioning-and-schedule
   
   TLDR is I think if we introduced a new function like the following: 
   
   ```rust
   fn regexp_is_match(
       array: &dyn Array, 
       regex_array: &dyn Array, 
       flags_array: Option<&dyn Array, >,
   ) -> Result<BooleanArray, ArrowError> {
   ..
   }
   ``
   
   We could then support StringView and StringArray and LargeStringArray 



-- 
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]

Reply via email to