projjal commented on code in PR #14579:
URL: https://github.com/apache/arrow/pull/14579#discussion_r1019590365
##########
cpp/src/gandiva/regex_util.cc:
##########
@@ -44,6 +45,10 @@ Status RegexUtil::SqlLikePatternToPcre(const std::string&
sql_pattern, char esca
cur = sql_pattern.at(idx);
if (cur == '_' || cur == '%' || cur == escape_char) {
+ if (cur == '\\') {
Review Comment:
This doesn't look correct to me. You should check `cur == escape_char`
instead of `curr == '\\'`
@kou in sql like pattern only _, % and escape_char are special characters.
And escape_character should only be followed by '_', '%' or the escape char
itself as mentioned in the comment in line 40. so we don't need to check for
other pcre special characters.
--
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]