terrymanu commented on a change in pull request #12140:
URL: https://github.com/apache/shardingsphere/pull/12140#discussion_r700015744
##########
File path:
shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/util/SQLUtil.java
##########
@@ -73,6 +76,15 @@
private static final String COMMENT_SUFFIX = "*/";
+ private static final Map<String, Pattern> PATTERNS = new LinkedHashMap<>();
+
+ static {
+ PATTERNS.put("$1.", Pattern.compile("^_|([^\\\\])_"));
+ PATTERNS.put("$1.*", Pattern.compile("^%|([^\\\\])%"));
+ PATTERNS.put("_", Pattern.compile("\\\\_"));
+ PATTERNS.put("%", Pattern.compile("\\\\%"));
Review comment:
Is it better to use variable name instead of map.
Variable name can self describe.
--
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]