ruanwenjun commented on code in PR #15878:
URL: 
https://github.com/apache/dolphinscheduler/pull/15878#discussion_r1571815807


##########
dolphinscheduler-task-plugin/dolphinscheduler-task-sql/src/main/java/org/apache/dolphinscheduler/plugin/task/sql/SqlTask.java:
##########
@@ -454,9 +454,9 @@ private SqlBinds getSqlAndSqlParamsMap(String sql) {
         String rgexo = "['\"]*\\!\\{(.*?)\\}['\"]*";
         sql = replaceOriginalValue(sql, rgexo, paramsMap);
         // replace the ${} of the SQL statement with the Placeholder
-        String formatSql = sql.replaceAll(rgex, "?");
+        // String formatSql = sql.replaceAll(rgex, "?");
         // Convert the list parameter
-        formatSql = ParameterUtils.expandListParameter(sqlParamsMap, 
formatSql);
+        String formatSql = ParameterUtils.expandListParameter(sqlParamsMap, 
sql, rgex);

Review Comment:
   The regex shouldn't exposed to outside.



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