jonathanc-n commented on code in PR #13414:
URL: https://github.com/apache/datafusion/pull/13414#discussion_r1842753814


##########
datafusion/functions/src/regex/regexpcount.rs:
##########
@@ -548,19 +549,25 @@ where
     }
 }
 
-fn compile_and_cache_regex<'a>(
-    regex: &'a str,
-    flags: Option<&'a str>,
-    regex_cache: &'a mut HashMap<String, Regex>,
-) -> Result<&'a Regex, ArrowError> {
-    if !regex_cache.contains_key(regex) {
+fn compile_and_cache_regex<'strings, 'cache>(
+    regex: &'strings str,
+    flags: Option<&'strings str>,
+    regex_cache: &'cache mut HashMap<(&'strings str, Option<&'strings str>), 
Regex>,
+) -> Result<&'cache Regex, ArrowError>
+where
+    'strings: 'cache,

Review Comment:
   Yeah, that was I was looking into, I think its saying that strings comes 
before the cache and lives after as well. I don't know if that is the correct 
behaviour



-- 
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...@datafusion.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to