-
Notifications
You must be signed in to change notification settings - Fork 902
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
Add decimal column handling in copy_type_metadata #7788
Add decimal column handling in copy_type_metadata #7788
Conversation
…opy-decimal-type-metadata
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this fix Ashwin 🙏
Can we now remove all explicit dtype checks too in the test_decimal file in this PR ? https://github.com/rapidsai/cudf/blob/branch-0.19/python/cudf/cudf/tests/test_decimal.py#L91
Will do! |
rerun tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
Codecov Report
@@ Coverage Diff @@
## branch-0.19 #7788 +/- ##
===============================================
+ Coverage 82.26% 82.68% +0.41%
===============================================
Files 103 103
Lines 17201 17572 +371
===============================================
+ Hits 14151 14530 +379
+ Misses 3050 3042 -8
Continue to review full report at Codecov.
|
rerun tests |
@gpucibot merge |
This enables joins on decimal columns with the same precision and scale. Closes #7497 Depends on #7788 Authors: - https://github.com/ChrisJar Approvers: - Keith Kraus (https://github.com/kkraus14) - Ashwin Srinath (https://github.com/shwina) - https://github.com/brandon-b-miller - Vyas Ramasubramani (https://github.com/vyasr) URL: #7764
This enables joins on decimal columns with the same precision and scale. Closes rapidsai#7497 Depends on rapidsai#7788 Authors: - https://github.com/ChrisJar Approvers: - Keith Kraus (https://github.com/kkraus14) - Ashwin Srinath (https://github.com/shwina) - https://github.com/brandon-b-miller - Vyas Ramasubramani (https://github.com/vyasr) URL: rapidsai#7764
All decimal columns returned by libcudf have a precision of 18 (
Decimal64Dtype.MAX_PRECISION
). Thecopy_type_metadata
method is extended to copy the precision from the input column to the result as often we want the returned column to have the same precision as the input column.In adding a test for this, I realized that the
assert_eq
utility is broken: it doesn't correctly check for dtype equality when the dtype is a cudf-specific type. Tacked on a fix.