[Feature][SQLTask] Suggest SQL task support variables in anywhere #10746
Closed
zhuxt2015 wants to merge 34 commits intoapache:devfrom
Closed
[Feature][SQLTask] Suggest SQL task support variables in anywhere #10746zhuxt2015 wants to merge 34 commits intoapache:devfrom
zhuxt2015 wants to merge 34 commits intoapache:devfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #10746 +/- ##
=========================================
Coverage 39.36% 39.36%
- Complexity 4631 4632 +1
=========================================
Files 987 987
Lines 37566 37566
Branches 4183 4183
=========================================
+ Hits 14787 14788 +1
Misses 21227 21227
+ Partials 1552 1551 -1
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
|
SonarCloud Quality Gate failed. |
ruanwenjun
reviewed
Aug 1, 2022
...hinscheduler-task-sql/src/main/java/org/apache/dolphinscheduler/plugin/task/sql/SqlTask.java
Outdated
Show resolved
Hide resolved
Contributor
|
Hi @zhuxt2015 please resolve the conflicts. |
b6b42fa to
0416351
Compare
caishunfeng
reviewed
Aug 15, 2022
| */ | ||
| private PreparedStatement prepareStatementAndBind(Connection connection, SqlBinds sqlBinds) { | ||
| // is the timeout set | ||
| boolean timeoutFlag = taskExecutionContext.getTaskTimeoutStrategy() == TaskTimeoutStrategy.FAILED |
Contributor
There was a problem hiding this comment.
It seems miss the timeout action.
Comment on lines
-424
to
-434
| sql = ParameterUtils.replaceScheduleTime(sql, taskExecutionContext.getScheduleTime()); | ||
| // special characters need to be escaped, ${} needs to be escaped | ||
| setSqlParamsMap(sql, rgex, sqlParamsMap, paramsMap,taskExecutionContext.getTaskInstanceId()); | ||
| //Replace the original value in sql !{...} ,Does not participate in precompilation | ||
| String rgexo = "['\"]*\\!\\{(.*?)\\}['\"]*"; | ||
| sql = replaceOriginalValue(sql, rgexo, paramsMap); | ||
| // replace the ${} of the SQL statement with the Placeholder | ||
| String formatSql = sql.replaceAll(rgex, "?"); | ||
| // Convert the list parameter | ||
| formatSql = ParameterUtils.expandListParameter(sqlParamsMap, formatSql); | ||
| sqlBuilder.append(formatSql); |
Contributor
There was a problem hiding this comment.
Why remove these logic?
Contributor
|
BTW, @zhuxt2015 can you add some UT for it? |
* [doc] Use Rainbond deployment DolphinScheduler Cluster Signed-off-by: Qi Zhang <smallqi1@163.com> * Update docs/docs/en/guide/installation/rainbond.md * Update docs/docs/en/guide/installation/rainbond.md * Update docs/docs/zh/guide/installation/rainbond.md * Update docs/docs/zh/guide/installation/rainbond.md * [doc] modify rainbond doc and add image Signed-off-by: Qi Zhang <smallqi1@163.com> * fix: img link Signed-off-by: Qi Zhang <smallqi1@163.com> * fix: modify proposal Signed-off-by: Qi Zhang <smallqi1@163.com> * docs: move rainbond docs to integration Signed-off-by: Qi Zhang <smallqi1@163.com> Signed-off-by: Qi Zhang <smallqi1@163.com> Co-authored-by: Jiajie Zhong <zhongjiajie955@gmail.com>
* Update instructions on worker groups
…ponent. (apache#11485) * [Refactor][UI] Refactor task definition batch stream using NSpace component. * [Refactor][UI] Refactor task definition batch stream using NSpace component. * [Refactor][UI] Refactor task definition batch stream using NSpace component.
In the process of realizing datax synchronization, use custom json for better connection to enable kerberos-authenticated clusters, such as using plug-ins such as hdfs and hbase
* [fix] Database change not sync * Make del sql upgrade same as release version * Correct data quality dml sql * Upgrade database DDL to avoid log path too long error * Add missing if exists
…e end of each java file (apache#11520)
* [test][HttpTask] Add unit tests to http task * [test][HttpTask] fix http task test code format problem * [test][HttpTask] fix http task test code replace http code to constants
* [Improvement] File deletion logic optimization
…pache#11489) * Support re running historical version workflow Support re running historical version workflow * Update ExecutorServiceImpl.java * Update ExecutorServiceImpl.java
Co-authored-by: Eric Gao <ericgao.apache@gmail.com>
…tion (apache#11543) * add can stop for execute state machine * add execute type check for pause operation
…eal null currently. (apache#11325)
apache#11441) and set the resource.storage.type default to hdfs
|
SonarCloud Quality Gate failed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.









Purpose of the pull request
fix #10745
Brief change log
Verify this pull request
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: