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] ValueError when multiplying decimal columns of large precision with scalars #13170

Closed
shwina opened this issue Apr 19, 2023 · 0 comments · Fixed by #13171
Closed

[BUG] ValueError when multiplying decimal columns of large precision with scalars #13170

shwina opened this issue Apr 19, 2023 · 0 comments · Fixed by #13171
Assignees
Labels
bug Something isn't working

Comments

@shwina
Copy link
Contributor

shwina commented Apr 19, 2023

#13034 introduced a regression when attempting to multiply decimal columns and scalars:

from decimal import Decimal

import cudf

cudf.Series([1, 2, 3, 4], dtype=cudf.Decimal128Dtype(38, 0)) * Decimal('100.0')
# ValueError: scale=-39 exceeds precision=38

The problematic change is this line:

0b59fda#diff-ab0b6c0cb47275bf318fb8392675fe9f1e17ec9b0b31a5a2d8c9440d503d0c89R160

We shouldn't try to cast the scalar to the same data type as the input in every situation.

@shwina shwina added bug Something isn't working Needs Triage Need team to review and classify python and removed Needs Triage Need team to review and classify labels Apr 19, 2023
@shwina shwina self-assigned this Apr 19, 2023
rapids-bot bot pushed a commit that referenced this issue Apr 26, 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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant