Au-Miner commented on code in PR #27920:
URL: https://github.com/apache/flink/pull/27920#discussion_r3087041579


##########
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/functions/SqlLikeUtils.java:
##########
@@ -97,7 +97,7 @@ public static String sqlToRegexLike(String sqlPattern, 
CharSequence escapeStr) {
             }
             escapeChar = escapeStr.charAt(0);
         } else {
-            escapeChar = '\\';

Review Comment:
   I don't think it's necessary to reverse, let me explain
   The purpose of FLINK-36100 is to ensure that the char after escapeChar, even 
regular special characters, can be correctly used by the JavaPattern when 
introducing escapeChar (add '\' in front)
   But now if we don't introduce escapeChar, the default value of escapeChar is 
'', which cannot meet the condition of c==escapeChar. Therefore, for regular 
special characters, we can also add \ to ensure correctness as before
   So I don't think there's a need for a revert



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

Reply via email to