You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/12/13 23:00:14 UTC

[GitHub] [arrow-rs] jwdeitch commented on a change in pull request #1042: fix(compute): LIKE/ILIKE/NLIKE escape parenthesis

jwdeitch commented on a change in pull request #1042:
URL: https://github.com/apache/arrow-rs/pull/1042#discussion_r768188149



##########
File path: arrow/src/compute/kernels/comparison.rs
##########
@@ -360,7 +360,11 @@ pub fn like_utf8_scalar<OffsetSize: StringOffsetSizeTrait>(
             }
         }
     } else {
-        let re_pattern = right.replace("%", ".*").replace("_", ".");
+        let re_pattern = right
+            .replace("%", ".*")
+            .replace("_", ".")
+            .replace("(", r#"\("#)

Review comment:
       good call. maybe we should pass `right` through this, then add the wildcards 
   https://docs.rs/regex/0.2.2/regex/fn.escape.html
   
   (I'm happy to help test this @ovr )




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

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