-
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
Add dseries.struct.explode
#9086
Conversation
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 putting this together @isVoid ! Nice work - the implementation is nice and clean. I just have a minor suggestion for the new test (and a docstring nit-pick).
I noticed one of the cases (for nested struct columns) failed because the field names were not properly reconstructed. Investigating. |
I think it's the nested field names got dropped upon constructing a nested type dask cudf object, as this behavior is observed from plain constructing a dask_cudf object: >>> ds = dask_cudf.from_cudf(cudf.Series([{'a': 123, 'b':{'c': 456}}]), 2)
>>> ds.compute()
0 {'a': 123, 'b': {'0': 456}}
dtype: struct This reminds me of a similar issue we had in cudf:
|
Closes #9121 Child column type metadata is applied after column is sliced. This resolves the issues of missing field names for nested struct columns in `__getitem__()`. In the process of working on this, I also ran into some issue with `StructColumn.to_arrow()`. This blocks proper testing of the behavior because `assert_eq` requires comparing the object on host. Unblocks #9086 Authors: - Michael Wang (https://github.com/isVoid) Approvers: - Ashwin Srinath (https://github.com/shwina) URL: #9131
rerun tests |
Codecov Report
@@ Coverage Diff @@
## branch-21.10 #9086 +/- ##
===============================================
Coverage ? 10.84%
===============================================
Files ? 116
Lines ? 18781
Branches ? 0
===============================================
Hits ? 2037
Misses ? 16744
Partials ? 0 Continue to review full report at Codecov.
|
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 - Thanks!
rerun tests |
@gpucibot merge |
rerun tests |
Not re-triggering the CI so that @rapidsai/ops can look into the logs here. |
rerun tests |
1 similar comment
rerun tests |
@gpucibot merge |
rerun tests |
1 similar comment
rerun tests |
Closes #8660
Per discussions in thread #8872 , this PR adds a struct-accessor member function to provide a lateral view to a struct type series.
Example: