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-15713][api]DataSource And UdfFunc list query use Enum code value rather than ordinal #15714

Merged
merged 7 commits into from
Apr 9, 2024

Conversation

songwenyong
Copy link
Contributor

@songwenyong songwenyong commented Mar 14, 2024

Purpose of the pull request

fix #15713

Brief change log

  • DataSource list query use DbType enum code value rather than ordinal

  • UdfFunc list query use UdfType code value rather than ordinal

Verify this pull request

This pull request is code cleanup without any test coverage.

(or)

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

@rickchengx rickchengx added bug Something isn't working 3.2.2 labels Mar 15, 2024
Copy link
Contributor

@rickchengx rickchengx left a comment

Choose a reason for hiding this comment

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

@songwenyong please link this PR to an issue

@songwenyong
Copy link
Contributor Author

@songwenyong please link this PR to an issue

done

@SbloodyS SbloodyS added improvement make more easy to user or prompt friendly and removed bug Something isn't working labels Mar 15, 2024
@SbloodyS SbloodyS added this to the 3.2.2 milestone Mar 15, 2024
@@ -162,7 +162,7 @@ public Result<Object> queryDataSource(@Parameter(hidden = true) @RequestAttribut
@ApiException(QUERY_DATASOURCE_ERROR)
public Result<Object> queryDataSourceList(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam("type") DbType type) {
List<DataSource> datasourceList = dataSourceService.queryDataSourceList(loginUser, type.ordinal());
List<DataSource> datasourceList = dataSourceService.queryDataSourceList(loginUser, type.getCode());
Copy link
Contributor

Choose a reason for hiding this comment

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

overall LGTM, please update the related UT

@codecov-commenter
Copy link

codecov-commenter commented Mar 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 39.20%. Comparing base (3927409) to head (3a33107).

❗ Current head 3a33107 differs from pull request most recent head f60db41. Consider uploading reports for the commit f60db41 to get more accurate results

Additional details and impacted files
@@            Coverage Diff            @@
##                dev   #15714   +/-   ##
=========================================
  Coverage     39.20%   39.20%           
  Complexity     4909     4909           
=========================================
  Files          1326     1326           
  Lines         45217    45217           
  Branches       4818     4818           
=========================================
  Hits          17729    17729           
  Misses        25617    25617           
  Partials       1871     1871           

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

Copy link
Member

@fuchanghai fuchanghai 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

sonarcloud bot commented Apr 9, 2024

@rickchengx rickchengx merged commit 9599b5a into apache:dev Apr 9, 2024
60 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 first time contributor First-time contributor 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][api]DataSource And UdfFunc list query shold use Enum code not ordinal
5 participants