lwtdev commented on a change in pull request #8604:
URL: https://github.com/apache/shardingsphere/pull/8604#discussion_r546325444
##########
File path:
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/jaxb/sql/loader/SQLCasesLoader.java
##########
@@ -117,7 +117,7 @@ private String getLiteralSQL(final String sql, final
List<?> parameters) {
if (null == parameters || parameters.isEmpty()) {
return sql;
}
- return String.format(sql.replace("%", "$").replace("?", "%s"),
parameters.toArray()).replace("$", "%").replace("%%", "%").replace("'%'",
"'%%'");
+ return String.format(sql.replace("%", "$$").replace("?", "%s"),
parameters.toArray()).replace("$$", "%").replace("%%", "%").replace("'%'",
"'%%'");
Review comment:
Add a replace method to replace sql parameters.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]