AMashenkov commented on code in PR #10579:
URL: https://github.com/apache/ignite/pull/10579#discussion_r1147381365


##########
modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/SqlListenerUtils.java:
##########
@@ -339,6 +339,7 @@ public static String translateSqlWildcardsToRegex(String 
sqlPtrn) {
         toRegex = toRegex.replaceAll("([^\\\\\\\\])((?:\\\\\\\\\\\\\\\\)*)%", 
"$1$2.*");
         toRegex = toRegex.replaceAll("([^\\\\\\\\])((?:\\\\\\\\\\\\\\\\)*)_", 
"$1$2.");
         toRegex = 
toRegex.replaceAll("([^\\\\\\\\])(\\\\\\\\(?>\\\\\\\\\\\\\\\\)*\\\\\\\\)*\\\\\\\\([_|%])",
 "$1$2$3");
+        toRegex = 
toRegex.replaceAll("([^\\\\\\\\])(\\\\\\\\(?>\\\\\\\\\\\\\\\\)*\\\\\\\\)*\\\\\\\\([_|%])",
 "$1$2$3");

Review Comment:
   These regexps are used only to transform and escape characters.
   I'd drop the regexps and parse string manually in one pass.
   



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