XiangpengHao commented on code in PR #11556:
URL: https://github.com/apache/datafusion/pull/11556#discussion_r1685554217
##########
datafusion/functions/src/regex/regexpreplace.rs:
##########
@@ -313,25 +322,24 @@ macro_rules! fetch_string_arg {
fn _regexp_replace_static_pattern_replace<T: OffsetSizeTrait>(
args: &[ArrayRef],
) -> Result<ArrayRef> {
- let string_array = as_generic_string_array::<T>(&args[0])?;
- let array_size = string_array.len();
+ let array_size = args[0].len();
let pattern = fetch_string_arg!(
&args[1],
"pattern",
- T,
+ i32,
Review Comment:
Because the second input is always must be Utf8 (as shown in the Signature
above).
I'm trying to make `T` to only be used on the `arg[0]`, so that later we can
test different types of `arg[0]`, e.g., `Utf8View`, `LargeUtf8`
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]