Skip to content

Conversation

@hoey94
Copy link
Contributor

@hoey94 hoey94 commented Jul 28, 2023

Purpose of the pull request

This pull request fix #14515

Related link: #12108
@boy-xiaozhang

Brief change log

old code in DqRuleInputEntryMapper.xml:

 SELECT a.id,
               a.field,
               a.type,
               a.title,
               a.`value`,
               a.options,
               a.placeholder,
               a.option_source_type,
               a.value_type,
               a.input_type,
               a.is_show,
               a.can_edit,
               a.is_emit,
               a.is_validate,
               b.values_map,
               b.index
        FROM t_ds_dq_rule_input_entry a join ( SELECT *
        FROM t_ds_relation_rule_input_entry where rule_id = #{ruleId} )  b
        on a.id = b.rule_input_entry_id order by b.index

new code :

SELECT a.id,
               a.field,
               a.type,
               a.title,
               a.value,
               a.options,
               a.placeholder,
               a.option_source_type,
               a.value_type,
               a.input_type,
               a.is_show,
               a.can_edit,
               a.is_emit,
               a.is_validate,
               b.values_map,
               b.index
        FROM t_ds_dq_rule_input_entry a join ( SELECT *
        FROM t_ds_relation_rule_input_entry where rule_id = #{ruleId} )  b
        on a.id = b.rule_input_entry_id order by b.index

Delete "`" and check , the new code query execution encounters an unfortunate failure when executed in the H2 database. In an effort to address this compatibility issue, I made an attempt to resolve it by appending ";NON_KEYWORDS=value" to the H2 URL.

old:

 url: jdbc:h2:mem:dolphinscheduler;MODE=MySQL;DB_CLOSE_DELAY=-1;DATABASE_TO_LOWER=true

new:

url: jdbc:h2:mem:dolphinscheduler;MODE=MySQL;DB_CLOSE_DELAY=-1;DATABASE_TO_LOWER=true;NON_KEYWORDS=value

Verify this pull request

This change can be verified as follows:

Manually verified the change by testing locally.

@hoey94
Copy link
Contributor Author

hoey94 commented Jul 31, 2023

@SbloodyS . Hello, I do not have write permissions.

@SbloodyS SbloodyS requested a review from zhongjiajie July 31, 2023 03:34
@SbloodyS SbloodyS added the 3.2.0 for 3.2.0 version label Jul 31, 2023
@SbloodyS SbloodyS added this to the 3.2.0 milestone Jul 31, 2023
@SbloodyS SbloodyS added the bug Something isn't working label Jul 31, 2023
@codecov-commenter
Copy link

codecov-commenter commented Jul 31, 2023

Codecov Report

Merging #14653 (b76a2c2) into dev (06b6ea8) will decrease coverage by 0.17%.
Report is 54 commits behind head on dev.
The diff coverage is 39.37%.

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

@@             Coverage Diff              @@
##                dev   #14653      +/-   ##
============================================
- Coverage     38.71%   38.54%   -0.17%     
- Complexity     4576     4591      +15     
============================================
  Files          1237     1280      +43     
  Lines         43537    43833     +296     
  Branches       4821     4843      +22     
============================================
+ Hits          16854    16895      +41     
- Misses        24811    25061     +250     
- Partials       1872     1877       +5     
Files Changed Coverage Δ
...che/dolphinscheduler/alert/config/AlertConfig.java 7.69% <0.00%> (-0.65%) ⬇️
...inscheduler/alert/registry/AlertHeartbeatTask.java 0.00% <0.00%> (ø)
...lphinscheduler/api/controller/QueueController.java 69.23% <0.00%> (-12.59%) ⬇️
...pache/dolphinscheduler/api/dto/gantt/GanttDto.java 31.25% <0.00%> (-0.90%) ⬇️
...che/dolphinscheduler/api/k8s/K8sClientService.java 5.00% <0.00%> (+0.65%) ⬆️
...uler/api/service/impl/K8SNamespaceServiceImpl.java 68.29% <ø> (+0.83%) ⬆️
...e/dolphinscheduler/common/constants/Constants.java 75.00% <ø> (ø)
...cheduler/common/constants/DataSourceConstants.java 0.00% <ø> (ø)
...ache/dolphinscheduler/dao/entity/TaskInstance.java 44.68% <0.00%> (-0.98%) ⬇️
...tasource/api/client/BaseAdHocDataSourceClient.java 0.00% <0.00%> (ø)
... and 85 more

... and 80 files with indirect coverage changes

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

@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 5 Code Smells

41.0% 41.0% Coverage
0.0% 0.0% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

@SbloodyS
Copy link
Member

SbloodyS commented Aug 7, 2023

@ruanwenjun @zhongjiajie PTAL.

@caishunfeng
Copy link
Contributor

related pr: #14717

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

Labels

3.2.0 for 3.2.0 version backend bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] [dolphinscheduler-api] Get dqRules entry failed in postgres database

5 participants