Skip to content

[Feature][SQLTask] Suggest SQL task support variables in anywhere #10746

Closed
zhuxt2015 wants to merge 34 commits intoapache:devfrom
zhuxt2015:sql_task_support_variables_anywhere
Closed

[Feature][SQLTask] Suggest SQL task support variables in anywhere #10746
zhuxt2015 wants to merge 34 commits intoapache:devfrom
zhuxt2015:sql_task_support_variables_anywhere

Conversation

@zhuxt2015
Copy link
Contributor

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:

@codecov-commenter
Copy link

codecov-commenter commented Jul 3, 2022

Codecov Report

Merging #10746 (18afe65) into dev (13d400c) will increase coverage by 0.00%.
The diff coverage is n/a.

@@            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     
Impacted Files Coverage Δ
...e/dolphinscheduler/remote/NettyRemotingClient.java 52.77% <0.00%> (+0.69%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jul 3, 2022

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@SbloodyS SbloodyS added feature new feature backend labels Jul 3, 2022
@SbloodyS SbloodyS added this to the 3.0.0-beta-3 milestone Jul 3, 2022
@caishunfeng caishunfeng removed this from the 3.0.0-release milestone Jul 20, 2022
@caishunfeng
Copy link
Contributor

Hi @zhuxt2015 please resolve the conflicts.

@zhuxt2015 zhuxt2015 force-pushed the sql_task_support_variables_anywhere branch from b6b42fa to 0416351 Compare August 14, 2022 12:56
*/
private PreparedStatement prepareStatementAndBind(Connection connection, SqlBinds sqlBinds) {
// is the timeout set
boolean timeoutFlag = taskExecutionContext.getTaskTimeoutStrategy() == TaskTimeoutStrategy.FAILED
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why remove these logic?

@caishunfeng
Copy link
Contributor

BTW, @zhuxt2015 can you add some UT for it?

zhuangchong and others added 8 commits August 21, 2022 19:17
* [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>
…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.
lugela and others added 18 commits August 21, 2022 19:17
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
* [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
@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

Bug E 1 Bug
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature][SQLTask] Suggest SQL task support variables in anywhere