Dandandan commented on code in PR #13364:
URL: https://github.com/apache/datafusion/pull/13364#discussion_r1838042302
##########
datafusion/functions/src/regex/regexpcount.rs:
##########
@@ -343,7 +342,7 @@ where
.map(|(value, flags)| {
let pattern =
compile_and_cache_regex(regex, flags, &mut
regex_cache)?;
- count_matches(value, &pattern, start_scalar)
+ count_matches(value, pattern, start_scalar)
Review Comment:
I don't get why it even needs to cache a scalar regex? I think the
compilation can be done earlier, so it can skip the lookup / cache and just
reuse the compiled regex.
--
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]