AMashenkov commented on code in PR #10579:
URL: https://github.com/apache/ignite/pull/10579#discussion_r1131523859
##########
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:
I guess the regexp in previous line is incorrect.
I'm not sure what the forward-lookup group (?>...) is required for.
Why do we need to apply regexp twice instead of fixing it?
--
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]