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/14 21:50:18 UTC

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

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



##########
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:
       I found the rust regex crate syntax difficult at the time so I would suggest adding test cases for all their escaping. Regex is so powerful it would be easy to miss something.




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