dolphinscheduler icon indicating copy to clipboard operation
dolphinscheduler copied to clipboard

when use list as out property in sql tasks, if sql result has only one row, still wrap result in a list

Open HouSong opened this issue 1 year ago • 5 comments

Purpose of the pull request

when use list as out property in sql tasks, if sql result has only one row, there will be an exception. In this PR, when use list as out property in sql tasks, if sql result has only one row, this result will be wrapped in a list; if sql result has no row, use property value as default and wrap it in a list (if property value exists) .

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:

(or)

If your pull request contain incompatible change, you should also add it to docs/docs/en/guide/upgrede/incompatible.md

HouSong avatar May 10 '24 05:05 HouSong

Please change your target branch to dev and link this PR to your issue.

I haven't created an issue for this PR. Is it required?

HouSong avatar May 10 '24 08:05 HouSong

Please rebase latest dev.

ruanwenjun avatar May 10 '24 11:05 ruanwenjun

Codecov Report

Attention: Patch coverage is 36.40000% with 318 lines in your changes are missing coverage. Please review.

Project coverage is 38.49%. Comparing base (3640a28) to head (2c65c17). Report is 141 commits behind head on dev.

:exclamation: Current head 2c65c17 differs from pull request most recent head 9ee0b1e. Consider uploading reports for the commit 9ee0b1e to get more accurate results

Files Patch % Lines
.../master/runner/taskgroup/TaskGroupCoordinator.java 42.10% 114 Missing and 7 partials :warning:
...duler/plugin/datasource/api/utils/CommonUtils.java 5.12% 37 Missing :warning:
.../server/master/runner/WorkflowExecuteRunnable.java 3.70% 24 Missing and 2 partials :warning:
...pache/dolphinscheduler/common/utils/FileUtils.java 22.22% 18 Missing and 3 partials :warning:
...aster/rpc/TaskInstanceWakeupOperationFunction.java 0.00% 16 Missing :warning:
...cheduler/api/service/impl/ExecutorServiceImpl.java 0.00% 11 Missing :warning:
...nscheduler/service/process/ProcessServiceImpl.java 56.00% 8 Missing and 3 partials :warning:
...tasource/mysql/param/MySQLDataSourceProcessor.java 0.00% 7 Missing and 1 partial :warning:
...ver/master/runner/TaskExecutionContextFactory.java 0.00% 8 Missing :warning:
...uler/plugin/task/api/parameters/SqlParameters.java 20.00% 5 Missing and 3 partials :warning:
... and 27 more
Additional details and impacted files
@@             Coverage Diff              @@
##                dev   #15972      +/-   ##
============================================
+ Coverage     38.15%   38.49%   +0.33%     
- Complexity     4707     4752      +45     
============================================
  Files          1304     1301       -3     
  Lines         44828    44781      -47     
  Branches       4807     4809       +2     
============================================
+ Hits          17105    17237     +132     
+ Misses        25870    25663     -207     
- Partials       1853     1881      +28     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar May 11 '24 13:05 codecov-commenter

Please retry analysis of this Pull-Request directly on SonarCloud

sonarqubecloud[bot] avatar May 11 '24 13:05 sonarqubecloud[bot]

There seems to be some conflict, please pull the upstream dev code.

wangxj3 avatar May 13 '24 11:05 wangxj3