-
Notifications
You must be signed in to change notification settings - Fork 915
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] Casting decimal64 into decimal32 fails with some values #9000
Comments
Possible cause: >>> np.int64(141230900000).astype(np.int32)
-503020768 |
If the value is too big to store in 32 bits, then I think overflow is expected. I don't think this would be a bug in that case. You could use a binary op to compare to CC @codereport |
This issue has been labeled |
I think this has been fixed. But it might depend on some of the decimal128 work. I don't see this kind of issue currently. |
This hasn't been "fixed" per se. As @harrism mentioned above, the issue is just that the Also, |
…ation (#9772) This resolves #9000. When using `cudf::cast` for a wider decimal type to a narrower decimal type, you can overflow. This PR modifies the code path for this specific use case so that the "rescale" happens for the type cast. A small perf improvement was added when you have identical scales to avoid rescaling. CI depends on #9766 Authors: - Conor Hoekstra (https://github.com/codereport) Approvers: - Nghia Truong (https://github.com/ttnghia) - Mike Wilson (https://github.com/hyperbolic2346) - Vukasin Milovanovic (https://github.com/vuule) URL: #9772
Describe the bug
With some
decimal64
input anddecimal32
type combination, I'm not getting expected result from libcudf. See below.Steps/Code to reproduce bug
Fails with:
Expected behavior
See
expected
variable in example above.Environment overview (please complete the following information)
Environment details
Click here to see environment details
The text was updated successfully, but these errors were encountered: