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

[REVIEW] Fix issue with extracting nested column data & dtype preservation #11671

Merged
merged 11 commits into from
Sep 12, 2022

Conversation

galipremsagar
Copy link
Contributor

@galipremsagar galipremsagar commented Sep 8, 2022

Description

This PR:
Fixes: #11670

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@galipremsagar galipremsagar added 3 - Ready for Review Ready for review by team Python Affects Python cuDF API. 4 - Needs cuDF (Python) Reviewer labels Sep 8, 2022
@galipremsagar galipremsagar self-assigned this Sep 8, 2022
@galipremsagar galipremsagar requested a review from a team as a code owner September 8, 2022 19:27
expected = pd.read_parquet(buffer)
actual = cudf.read_parquet(buffer)
assert_eq(expected, actual)
assert_eq(df.a.dtype, actual.a.dtype)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The current branch-22.10 issue can be seen in this error:

(Pdb) assert_eq(df.a.dtype, actual.a.dtype)
*** AssertionError: 
Items are not equal:
 ACTUAL: StructDtype({'Domain': StructDtype({'Id': StructDtype({'Name': dtype('O'), 'Value': dtype('O')}), 'Name': dtype('O')}), 'Duration': dtype('int64'), 'Offset': dtype('int64'), 'Resource': ListDtype(StructDtype({'Name': dtype('O'), 'Value': dtype('O')})), 'StreamId': dtype('O')})
 DESIRED: StructDtype({'Domain': StructDtype({'Id': StructDtype({'Name': dtype('O'), 'Value': dtype('O')}), 'Name': dtype('O')}), 'Duration': dtype('int64'), 'Offset': dtype('int64'), 'Resource': ListDtype(StructDtype({'0': dtype('O'), '1': dtype('O')})), 'StreamId': dtype('O')})

@galipremsagar galipremsagar added bug Something isn't working non-breaking Non-breaking change labels Sep 8, 2022
@codecov
Copy link

codecov bot commented Sep 8, 2022

Codecov Report

Base: 86.39% // Head: 86.41% // Increases project coverage by +0.02% 🎉

Coverage data is based on head (f6da734) compared to base (9f8db66).
Patch coverage: 100.00% of modified lines in pull request are covered.

❗ Current head f6da734 differs from pull request most recent head d12acd9. Consider uploading reports for the commit d12acd9 to get more accurate results

Additional details and impacted files
@@               Coverage Diff                @@
##           branch-22.10   #11671      +/-   ##
================================================
+ Coverage         86.39%   86.41%   +0.02%     
================================================
  Files               145      145              
  Lines             23005    23009       +4     
================================================
+ Hits              19875    19884       +9     
+ Misses             3130     3125       -5     
Impacted Files Coverage Δ
python/cudf/cudf/core/column/column.py 88.62% <100.00%> (ø)
python/cudf/cudf/core/column/lists.py 93.75% <100.00%> (+1.10%) ⬆️
python/cudf/cudf/core/column/numerical.py 95.61% <0.00%> (-0.30%) ⬇️
python/cudf/cudf/core/dataframe.py 93.77% <0.00%> (+0.04%) ⬆️
python/cudf/cudf/core/column/string.py 88.53% <0.00%> (+0.12%) ⬆️
python/cudf/cudf/core/groupby/groupby.py 91.12% <0.00%> (+0.21%) ⬆️
python/cudf/cudf/core/tools/datetimes.py 84.49% <0.00%> (+0.30%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@wence- wence- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good, with minor queries about some aspects, and then a more general question about whether the API of interop.to_arrow is the most natural one.

Copy link
Contributor

@wence- wence- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@galipremsagar galipremsagar removed the 3 - Ready for Review Ready for review by team label Sep 12, 2022
@galipremsagar galipremsagar added 5 - Ready to Merge Testing and reviews complete, ready to merge and removed 4 - Needs cuDF (Python) Reviewer labels Sep 12, 2022
@galipremsagar
Copy link
Contributor Author

@gpucibot merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5 - Ready to Merge Testing and reviews complete, ready to merge bug Something isn't working non-breaking Non-breaking change Python Affects Python cuDF API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Extracting a nested list-host-scalar throws error
3 participants