Dandandan commented on code in PR #13364:
URL: https://github.com/apache/datafusion/pull/13364#discussion_r1838046917


##########
datafusion/functions/src/regex/regexpcount.rs:
##########
@@ -395,7 +394,7 @@ where
                     let pattern =
                         compile_and_cache_regex(regex, flags, &mut 
regex_cache)?;
 
-                    count_matches(value, &pattern, start)
+                    count_matches(value, pattern, start)

Review Comment:
   All `Int64Array::from_iter_values` can be replaced by changing 
`.collect::<Result<Vec<i64>, ArrowError>>()?` into 
`.collect::<Result<Int64Array, ArrowError>>()?`
   This avoids one temporary Vec.



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

Reply via email to