Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Improvement-15919][datasource] Improvement datasource get name #15920

Merged
merged 4 commits into from
Apr 28, 2024

Conversation

sdhzwc
Copy link
Contributor

@sdhzwc sdhzwc commented Apr 26, 2024

fix #15919

Purpose of the pull request

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

@Radeity Radeity added this to the 3.2.2 milestone Apr 26, 2024
@Radeity Radeity added the improvement make more easy to user or prompt friendly label Apr 26, 2024
Radeity
Radeity previously approved these changes Apr 26, 2024
@Radeity Radeity added the 3.2.2 label Apr 26, 2024
@codecov-commenter
Copy link

codecov-commenter commented Apr 26, 2024

Codecov Report

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

Project coverage is 39.72%. Comparing base (b29965b) to head (4d1f97c).

❗ Current head 4d1f97c differs from pull request most recent head 27449d9. Consider uploading reports for the commit 27449d9 to get more accurate results

Files Patch % Lines
.../org/apache/dolphinscheduler/spi/enums/DbType.java 0.00% 30 Missing ⚠️
...atasource/api/plugin/DataSourceClientProvider.java 0.00% 4 Missing ⚠️
...ce/api/datasource/AbstractDataSourceProcessor.java 0.00% 1 Missing ⚠️
...asource/athena/AthenaDataSourceChannelFactory.java 0.00% 1 Missing ⚠️
...rce/azuresql/AzureSQLDataSourceChannelFactory.java 0.00% 1 Missing ⚠️
...clickhouse/ClickHouseDataSourceChannelFactory.java 0.00% 1 Missing ⚠️
...asource/dameng/DamengDataSourceChannelFactory.java 0.00% 1 Missing ⚠️
...rce/databend/DatabendDataSourceChannelFactory.java 0.00% 1 Missing ⚠️
...in/datasource/db2/DB2DataSourceChannelFactory.java 0.00% 1 Missing ⚠️
.../datasource/hive/HiveDataSourceChannelFactory.java 0.00% 1 Missing ⚠️
... and 10 more
Additional details and impacted files
@@             Coverage Diff              @@
##                dev   #15920      +/-   ##
============================================
+ Coverage     39.66%   39.72%   +0.06%     
- Complexity     5013     5034      +21     
============================================
  Files          1349     1349              
  Lines         45613    45615       +2     
  Branches       4891     4891              
============================================
+ Hits          18091    18122      +31     
+ Misses        25607    25578      -29     
  Partials       1915     1915              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -32,6 +33,6 @@ public DataSourceChannel create() {

@Override
public String getName() {
return "athena";
return DbType.ATHENA.getDescp();
Copy link
Member

Choose a reason for hiding this comment

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

What about change the descp to identify or name in DbType, since descp means description, this is easy to be changed.

Copy link
Contributor Author

@sdhzwc sdhzwc Apr 26, 2024

Choose a reason for hiding this comment

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

What about change the descp to identify or name in DbType, since descp means description, this is easy to be changed.

I suggest change it to this (DbType.ATHENA.name().toLowerCase()) Or add a field name to the DbType
The descp field I would recommend keeping,What do you recommend?

Copy link
Member

Choose a reason for hiding this comment

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

You can add new field name or identify in DbType.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You can add new field name or identify in DbType.

Modifications completed

Copy link
Member

@ruanwenjun ruanwenjun left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@Radeity Radeity left a comment

Choose a reason for hiding this comment

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

+1

Copy link

sonarcloud bot commented Apr 28, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
16.9% Coverage on New Code (required ≥ 60%)

See analysis details on SonarCloud

@ruanwenjun ruanwenjun merged commit 7a55ade into apache:dev Apr 28, 2024
61 of 62 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.2.2 backend improvement make more easy to user or prompt friendly ready-to-merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Improvement][datasource] improvement datasource get name
4 participants