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

Unmarshal NaN and Infinite values correctly #715

Merged
merged 1 commit into from
Sep 7, 2023

Conversation

fisherevans
Copy link
Contributor

@fisherevans fisherevans commented Aug 29, 2023

The current implementation of unmarshaling Float64s does not handle Infinity values. This can be tested by creating a Sum aggregate of two document attributes that are both "Max Float" values or "Negative Max Float" values. The current behavior is a bubbled up error from strconv.ParseFloat(string(data), 64) which cannot handle a value like "+Infinity".

@fisherevans fisherevans changed the title unmarshal nan and infinite values correctly Unmarshal NaN and Infinite values correctly Aug 29, 2023
@elasticmachine
Copy link
Collaborator

Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually?

@cla-checker-service
Copy link

cla-checker-service bot commented Aug 29, 2023

💚 CLA has been signed

@fisherevans
Copy link
Contributor Author

Signed

@Anaethelion Anaethelion self-requested a review September 7, 2023 13:14
Copy link
Contributor

@Anaethelion Anaethelion left a comment

Choose a reason for hiding this comment

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

Thank you!

I'll merge this for proper credit and will backport to the generator for future propagation.

@Anaethelion Anaethelion merged commit 3a24a09 into elastic:main Sep 7, 2023
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.

None yet

3 participants