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

make gp_dqa test case stable #521

Merged
merged 1 commit into from
Jul 18, 2024
Merged

make gp_dqa test case stable #521

merged 1 commit into from
Jul 18, 2024

Conversation

congxuebin
Copy link
Contributor

@congxuebin congxuebin commented Jul 15, 2024

ICW test case gp_dqa failed intermittently, as following example:

select corr(distinct d, i) from dqa_t1;
         corr        
 --------------------
- 0.0824013341460019
+ 0.0824013341460018
 (1 row) 

It is not a good practice to verify the fload8 data directly due to precision issues.
Thus setting GUC extra_float_digits=-1 to truncate the precision of the floating-point number to a manageable level that minimizes the impact of rounding errors. The result of corresponding example would be changed to as following:

       corr        
-------------------
 0.082401334146002

This modification ensures that the comparison of floating-point results in our test cases is conducted in a manner that is both practical and reliable.

@avamingli
Copy link
Contributor

Why create another pr?

@congxuebin
Copy link
Contributor Author

@avamingli Mingli, thanks for the suggestion. According to it I changed to use extra_float_digits. The old PR was automatically closed when I undo the earlier commit. The modification is totally different from the one earlier. Would it be OK if I use this new PR?

@congxuebin congxuebin requested a review from avamingli July 16, 2024 06:10
@congxuebin congxuebin changed the title to enhance gp_dqa test stability,avoiding issues arising from imprecision of floating-point arithmetic enhance gp_dqa test stability, avoiding issues arising from imprecision of floating-point arithmetic Jul 16, 2024
@congxuebin congxuebin changed the title enhance gp_dqa test stability, avoiding issues arising from imprecision of floating-point arithmetic make gp_dqa test case stable Jul 16, 2024
@avamingli
Copy link
Contributor

@avamingli Mingli, thanks for the suggestion. According to it I changed to use extra_float_digits. The old PR was automatically closed when I undo the earlier commit. The modification is totally different from the one earlier. Would it be OK if I use this new PR?

Next time, could use git reset to rollback your commit, git rebase to squash commits and push force on your branch if ready.
We should always keep context and all story in only one PR.

@congxuebin
Copy link
Contributor Author

@avamingli Got it. Will do. Thanks Mingli.

@congxuebin
Copy link
Contributor Author

Unfortunately I forgot to close this PR before another commit. I think it's required to go through the CI process again.

@congxuebin
Copy link
Contributor Author

Hi Mingli @avamingli,
All tests have passed, can you please help merge the PR?

@avamingli avamingli merged commit 7047c5f into apache:main Jul 18, 2024
20 checks passed
@avamingli
Copy link
Contributor

Pushed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants