Dandandan commented on a change in pull request #1085:
URL: https://github.com/apache/arrow-rs/pull/1085#discussion_r773974426
##########
File path: arrow/src/compute/kernels/comparison.rs
##########
@@ -259,14 +259,14 @@ where
let mut result = BooleanBufferBuilder::new(left.len());
for i in 0..left.len() {
let haystack = left.value(i);
- let pat = right.value(i);
- let re = if let Some(ref regex) = map.get(pat) {
+ let pat = escape(right.value(i));
+ let re = if let Some(ref regex) = map.get(&pat) {
regex
} else {
let re_pattern = pat.replace("%", ".*").replace("_", ".");
Review comment:
But we could minimize some borrow / cloning by moving the `escape`... So
now it looks more similar to the other places.
--
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]