ChPi commented on code in PR #13352:
URL:
https://github.com/apache/dolphinscheduler/pull/13352#discussion_r1066765262
##########
dolphinscheduler-task-plugin/dolphinscheduler-task-sql/src/main/java/org/apache/dolphinscheduler/plugin/task/sql/SqlTask.java:
##########
@@ -506,7 +506,7 @@ private SqlBinds getSqlAndSqlParamsMap(String sql) {
// replace the ${} of the SQL statement with the Placeholder
String formatSql = sql.replaceAll(rgex, "?");
// Convert the list parameter
- formatSql = ParameterUtils.expandListParameter(sqlParamsMap,
formatSql);
+ formatSql = ParameterUtils.expandListParameter(sqlParamsMap, sql,
rgex);
Review Comment:
i think its better to merge `sql.replaceAll` and
`ParameterUtils.expandListParameter`, only one replace like
`replaceOriginalValue`
##########
dolphinscheduler-task-plugin/dolphinscheduler-task-sql/src/main/java/org/apache/dolphinscheduler/plugin/task/sql/SqlTask.java:
##########
@@ -506,7 +506,7 @@ private SqlBinds getSqlAndSqlParamsMap(String sql) {
// replace the ${} of the SQL statement with the Placeholder
String formatSql = sql.replaceAll(rgex, "?");
// Convert the list parameter
- formatSql = ParameterUtils.expandListParameter(sqlParamsMap,
formatSql);
+ formatSql = ParameterUtils.expandListParameter(sqlParamsMap, sql,
rgex);
Review Comment:
i think its better to merge `sql.replaceAll` and
`ParameterUtils.expandListParameter`, like `replaceOriginalValue`
--
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]