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

[BUG] rounding doubles floats can result in -0.0 result #9349

Open
revans2 opened this issue Sep 29, 2023 · 0 comments
Open

[BUG] rounding doubles floats can result in -0.0 result #9349

revans2 opened this issue Sep 29, 2023 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@revans2
Copy link
Collaborator

revans2 commented Sep 29, 2023

Describe the bug
I'm not sure how big of a bug this is, but when we do a round or a bround it is possible for us to produce a -0.0 result, but Spark will never do this because it goes through BigDecimal to do the rounding.

Steps/Code to reproduce bug

bround(-2.0633452147848027e-23, 11)

Expected behavior
We produce the same 0.0 that Spark does. (We probably can just normalize the output to make this work)

@revans2 revans2 added bug Something isn't working ? - Needs Triage Need team to review and classify labels Sep 29, 2023
@mattahrens mattahrens added good first issue Good for newcomers and removed ? - Needs Triage Need team to review and classify labels Oct 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants