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

fix: validate column sum/min/max issue for decimals with precision beyond int64/float64 #918

Merged
merged 3 commits into from
Jul 28, 2023

Conversation

nj1973
Copy link
Contributor

@nj1973 nj1973 commented Jul 27, 2023

This PR adds a change to cast decimal aggregations to string if the source column precision > 18. Prior to this change the values were cast to float64 which would lose precision and give false success statuses. Because the change casts to string after any aggregations there should be no side effects.

I have tested this for column and custom-query validations and have added a regression test to test_oracle.py.

@nj1973 nj1973 requested a review from a team as a code owner July 27, 2023 10:24
Copy link
Collaborator

@nehanene15 nehanene15 left a comment

Choose a reason for hiding this comment

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

LGTM, this is great. Didn't realize we already had support to CAST within the aggregate field config.

@nehanene15
Copy link
Collaborator

I believe this closes Issue #754 as well

@nj1973 nj1973 merged commit 5a8d691 into develop Jul 28, 2023
3 checks passed
@nj1973 nj1973 deleted the fix/900-validate-column-issue branch July 28, 2023 08:02
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.

validate column: Fix for issue 763 has side effect which causes false positive validations
2 participants