pinkhello opened a new issue, #11437:
URL: https://github.com/apache/dolphinscheduler/issues/11437

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and 
found no similar issues.
   
   
   ### What happened
   
   My python script contains SQL:
   `select JSON_EXTRACT(json_value, CONCAT('$[', id - 1, '].input1') from test`
   The python script SQL generated when ds is replaced
   :
   `select JSON_EXTRACT(json_val, CONCAT(', id - 1, .input1') from test`
   
   ### What you expected to happen
   
   SQL should keep original:
   `select JSON_EXTRACT(json_value, CONCAT('$[', id - 1, '].input1') from test`
   
   ### How to reproduce
   
   - add UT for 
org.apache.dolphinscheduler.plugin.task.api.parser.ParameterUtilsTest#convertParameterPlaceholders
   `String sql = "select JSON_EXTRACT(json_val, CONCAT('$[', id - 1, 
'].input1') from test";`
     `String sqlScript = ParameterUtils.convertParameterPlaceholders(sql, 
params);`
     `Assert.assertEquals("select JSON_EXTRACT(json_val, CONCAT(', id - 1, 
input1') from test", sqlScript);`
   - run UT
   
   
   ### Anything else
   
   _No response_
   
   ### Version
   
   dev
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


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