-
Notifications
You must be signed in to change notification settings - Fork 878
fix: Casting to float lose precision in some cases #10423
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
base: develop
Are you sure you want to change the base?
Conversation
…loat-lose-precision-in-some-cases fix: casting to float lose precision in some cases orientechnologies#10391
Hi, Thank you, just triggered the ci build on this, if all pass will merge it and port it to 3.2.x Bye |
Hi, Tests are failing, so we do have cases where we rely on this conversion, looking in the code is possible to avoid this conversion specifying the double type at the end of the number, so something like: Regards |
Hi, Maybe another possible approach is replace the check:
Can you verify if a check like this works in your case and update the PR? |
One last thing (hopefully ...) in case you update this PR can you add a test case for the case conversion error in OInsertStatementExecutionTest or in OUpdateStatementExecutionTest so we avoid to get regression in future. |
I ll try it tomorrow, ty |
Hi, Tried to run the tests, they fail for formatting, you can run (waiting for the test as well ) |
What does this PR do?
I reproduced the case and it seems like when casting to float the precision is lost
Related to -> #10391
Motivation
Because i use this database everyday
Related issues
#10391
Additional Notes
I don't know exactly why that cast to float was used, but it seems generates some problems