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

Fastavro floating number imprecision #132

Merged
merged 7 commits into from
Jan 7, 2025

Conversation

tianj7
Copy link
Contributor

@tianj7 tianj7 commented Jan 7, 2025

https://ctds-planx.atlassian.net/browse/PXP-11430

Bug Fixes

Use correct fastavro type for floating number to prevent imprecision

Improvements

Update detect-secrets and black version
remove unused trufflehog secret detection.

@@ -4,7 +4,7 @@

from ..cli import from_command

_AVRO_TYPES = {"integer": "long", "number": "float", "int": "long"}
_AVRO_TYPES = {"integer": "long", "number": "double", "int": "long"}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggestion: swap magic string with a constant, makes for fewer changes in the future. although...in a case like this it would be the same number of changes either way, so maybe this suggestion is pointless?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

personally I don't see an advantage in changing this at the moment, we could revisit later

Copy link
Contributor

@AlbertSnows AlbertSnows left a comment

Choose a reason for hiding this comment

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

this should be tested on one of the VMs but otherwise looks fine

@tianj7 tianj7 merged commit 0d630be into master Jan 7, 2025
5 checks passed
@tianj7 tianj7 deleted the fix/fastavro-floating-number-imprecision branch January 7, 2025 20:20
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