You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by "xxzuo (via GitHub)" <gi...@apache.org> on 2024/04/18 15:21:49 UTC
[PR] [Fix-15828] fix expandListParameter [dolphinscheduler]
xxzuo opened a new pull request, #15878:
URL: https://github.com/apache/dolphinscheduler/pull/15878
<!--Thanks very much for contributing to Apache DolphinScheduler, we are happy that you want to help us improve DolphinScheduler! -->
## Purpose of the pull request
<!--(For example: This pull request adds checkstyle plugin).-->
- fix #15828
- Expand the list parameters when matching `${}` instead of first replacing ${} with a `?` and then processing the parameters based on the `?`
## Brief change log
<!--*(for example:)*
- *Add maven-checkstyle-plugin to root pom.xml*
-->
## Verify this pull request
<!--*(Please pick either of the following options)*-->
This pull request is code cleanup without any test coverage.
*(or)*
This pull request is already covered by existing tests, such as *(please describe tests)*.
(or)
This change added tests and can be verified as follows:
<!--*(example:)*
- *Added dolphinscheduler-dao tests for end-to-end.*
- *Added CronUtilsTest to verify the change.*
- *Manually verified the change by testing locally.* -->
(or)
If your pull request contain incompatible change, you should also add it to `docs/docs/en/guide/upgrede/incompatible.md`
--
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: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix-15828] fix expandListParameter [dolphinscheduler]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #15878:
URL: https://github.com/apache/dolphinscheduler/pull/15878#issuecomment-2071264340
## [](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=15878) **Quality Gate failed**
Failed conditions
 [58.1% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=15878&metric=new_coverage&view=list) (required ≥ 60%)
[See analysis details on SonarCloud](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=15878)
--
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: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix-15828] fix expandListParameter [dolphinscheduler]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #15878:
URL: https://github.com/apache/dolphinscheduler/pull/15878#issuecomment-2207890047
## [](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=15878) **Quality Gate failed**
Failed conditions
 [55.8% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=15878&metric=new_coverage&view=list) (required ≥ 60%)
[See analysis details on SonarCloud](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=15878)
--
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: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix-15828] fix expandListParameter [dolphinscheduler]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #15878:
URL: https://github.com/apache/dolphinscheduler/pull/15878#issuecomment-2071258120
## [Codecov](https://app.codecov.io/gh/apache/dolphinscheduler/pull/15878?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
Attention: Patch coverage is `56.00000%` with `11 lines` in your changes are missing coverage. Please review.
> Project coverage is 39.61%. Comparing base [(`e9d8591`)](https://app.codecov.io/gh/apache/dolphinscheduler/commit/e9d85914d78197314bee585500d94a6a90733789?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to head [(`d32f5c8`)](https://app.codecov.io/gh/apache/dolphinscheduler/pull/15878?dropdown=coverage&src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
> :exclamation: Current head d32f5c8 differs from pull request most recent head 3ce3730. Consider uploading reports for the commit 3ce3730 to get more accurate results
| [Files](https://app.codecov.io/gh/apache/dolphinscheduler/pull/15878?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
|---|---|---|
| [...dolphinscheduler/plugin/task/api/AbstractTask.java](https://app.codecov.io/gh/apache/dolphinscheduler/pull/15878?src=pr&el=tree&filepath=dolphinscheduler-task-plugin%2Fdolphinscheduler-task-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fdolphinscheduler%2Fplugin%2Ftask%2Fapi%2FAbstractTask.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZG9scGhpbnNjaGVkdWxlci10YXNrLXBsdWdpbi9kb2xwaGluc2NoZWR1bGVyLXRhc2stYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kb2xwaGluc2NoZWR1bGVyL3BsdWdpbi90YXNrL2FwaS9BYnN0cmFjdFRhc2suamF2YQ==) | 0.00% | [3 Missing :warning: ](https://app.codecov.io/gh/apache/dolphinscheduler/pull/15878?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [...olphinscheduler/plugin/task/api/TaskConstants.java](https://app.codecov.io/gh/apache/dolphinscheduler/pull/15878?src=pr&el=tree&filepath=dolphinscheduler-task-plugin%2Fdolphinscheduler-task-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fdolphinscheduler%2Fplugin%2Ftask%2Fapi%2FTaskConstants.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZG9scGhpbnNjaGVkdWxlci10YXNrLXBsdWdpbi9kb2xwaGluc2NoZWR1bGVyLXRhc2stYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kb2xwaGluc2NoZWR1bGVyL3BsdWdpbi90YXNrL2FwaS9UYXNrQ29uc3RhbnRzLmphdmE=) | 0.00% | [3 Missing :warning: ](https://app.codecov.io/gh/apache/dolphinscheduler/pull/15878?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [...ache/dolphinscheduler/plugin/task/sql/SqlTask.java](https://app.codecov.io/gh/apache/dolphinscheduler/pull/15878?src=pr&el=tree&filepath=dolphinscheduler-task-plugin%2Fdolphinscheduler-task-sql%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fdolphinscheduler%2Fplugin%2Ftask%2Fsql%2FSqlTask.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZG9scGhpbnNjaGVkdWxlci10YXNrLXBsdWdpbi9kb2xwaGluc2NoZWR1bGVyLXRhc2stc3FsL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kb2xwaGluc2NoZWR1bGVyL3BsdWdpbi90YXNrL3NxbC9TcWxUYXNrLmphdmE=) | 0.00% | [3 Missing :warning: ](https://app.codecov.io/gh/apache/dolphinscheduler/pull/15878?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [...cheduler/plugin/task/api/utils/ParameterUtils.java](https://app.codecov.io/gh/apache/dolphinscheduler/pull/15878?src=pr&el=tree&filepath=dolphinscheduler-task-plugin%2Fdolphinscheduler-task-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fdolphinscheduler%2Fplugin%2Ftask%2Fapi%2Futils%2FParameterUtils.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZG9scGhpbnNjaGVkdWxlci10YXNrLXBsdWdpbi9kb2xwaGluc2NoZWR1bGVyLXRhc2stYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kb2xwaGluc2NoZWR1bGVyL3BsdWdpbi90YXNrL2FwaS91dGlscy9QYXJhbWV0ZXJVdGlscy5qYXZh) | 87.50% | [1 Missing and 1 partial :warning: ](https://app.codecov.io/gh/apache/dolphinscheduler/pull/15878?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## dev #15878 +/- ##
============================================
- Coverage 39.64% 39.61% -0.03%
+ Complexity 5023 5017 -6
============================================
Files 1349 1349
Lines 45593 45519 -74
Branches 4890 4875 -15
============================================
- Hits 18074 18032 -42
+ Misses 25596 25564 -32
Partials 1923 1923
```
</details>
[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/dolphinscheduler/pull/15878?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
--
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: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix-15828] fix expandListParameter [dolphinscheduler]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #15878:
URL: https://github.com/apache/dolphinscheduler/pull/15878#issuecomment-2115067174
## [](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=15878) **Quality Gate failed**
Failed conditions
 [42.3% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=15878&metric=new_coverage&view=list) (required ≥ 60%)
[See analysis details on SonarCloud](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=15878)
--
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: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix-15828] fix expandListParameter [dolphinscheduler]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #15878:
URL: https://github.com/apache/dolphinscheduler/pull/15878#issuecomment-2115064258
## [](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=15878) **Quality Gate failed**
Failed conditions
 [42.3% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=15878&metric=new_coverage&view=list) (required ≥ 60%)
[See analysis details on SonarCloud](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=15878)
--
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: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix-15828] fix expandListParameter [dolphinscheduler]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #15878:
URL: https://github.com/apache/dolphinscheduler/pull/15878#issuecomment-2204995372
## [](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=15878) **Quality Gate passed**
Issues
 [0 New issues](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=15878&resolved=false&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=15878&resolutions=WONTFIX)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=15878&resolved=false&sinceLeakPeriod=true)
 [64.3% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=15878&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=15878&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarCloud](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=15878)
--
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: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix-15828] fix expandListParameter [dolphinscheduler]
Posted by "xxzuo (via GitHub)" <gi...@apache.org>.
xxzuo commented on code in PR #15878:
URL: https://github.com/apache/dolphinscheduler/pull/15878#discussion_r1572303704
##########
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:
I extract this rgex into `TaskConstants`
--
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: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix-15828] fix expandListParameter [dolphinscheduler]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #15878:
URL: https://github.com/apache/dolphinscheduler/pull/15878#issuecomment-2067409995
## [](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=15878) **Quality Gate failed**
Failed conditions
 [58.1% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=15878&metric=new_coverage&view=list) (required ≥ 60%)
[See analysis details on SonarCloud](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=15878)
--
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: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix-15828] fix expandListParameter [dolphinscheduler]
Posted by "SbloodyS (via GitHub)" <gi...@apache.org>.
SbloodyS merged PR #15878:
URL: https://github.com/apache/dolphinscheduler/pull/15878
--
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: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix-15828] fix expandListParameter [dolphinscheduler]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #15878:
URL: https://github.com/apache/dolphinscheduler/pull/15878#issuecomment-2204994885
## [](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=15878) **Quality Gate passed**
Issues
 [0 New issues](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=15878&resolved=false&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=15878&resolutions=WONTFIX)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=15878&resolved=false&sinceLeakPeriod=true)
 [64.3% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=15878&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=15878&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarCloud](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=15878)
--
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: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix-15828] fix expandListParameter [dolphinscheduler]
Posted by "xxzuo (via GitHub)" <gi...@apache.org>.
xxzuo commented on code in PR #15878:
URL: https://github.com/apache/dolphinscheduler/pull/15878#discussion_r1572217440
##########
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:
I have reused `AbstractTask.rgex` here. Should I reference `AbstractTask.rgex` in `ParameterUtils` or should I extract this rgex into a constant class? I apologize for not being familiar with this code specification.
--
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: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix-15828] fix expandListParameter [dolphinscheduler]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #15878:
URL: https://github.com/apache/dolphinscheduler/pull/15878#issuecomment-2240943953
## [](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=15878) **Quality Gate passed**
Issues
 [0 New issues](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=15878&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=15878&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=15878&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [64.3% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=15878&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=15878&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarCloud](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=15878)
--
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: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix-15828] fix expandListParameter [dolphinscheduler]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #15878:
URL: https://github.com/apache/dolphinscheduler/pull/15878#issuecomment-2240943672
## [](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=15878) **Quality Gate passed**
Issues
 [0 New issues](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=15878&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=15878&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=15878&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [64.3% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=15878&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=15878&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarCloud](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=15878)
--
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: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix-15828] fix expandListParameter [dolphinscheduler]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #15878:
URL: https://github.com/apache/dolphinscheduler/pull/15878#issuecomment-2207890080
Please retry analysis of this Pull-Request directly on SonarCloud
--
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: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix-15828] fix expandListParameter [dolphinscheduler]
Posted by "ruanwenjun (via GitHub)" <gi...@apache.org>.
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: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix-15828] fix expandListParameter [dolphinscheduler]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #15878:
URL: https://github.com/apache/dolphinscheduler/pull/15878#issuecomment-2067410945
## [](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=15878) **Quality Gate failed**
Failed conditions
 [58.1% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=15878&metric=new_coverage&view=list) (required ≥ 60%)
[See analysis details on SonarCloud](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=15878)
--
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: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org