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

Fix struct and list dtype logic in dask_cudf.read_parquet #9159

Closed

Conversation

rjzamora
Copy link
Member

@rjzamora rjzamora commented Sep 1, 2021

The dask_cudf.read_parquet logic currently uses a utility called set_object_dtypes_from_pa_schema to cast dtypes into proper cudf/pyarrow dtypes. The same utility is used to both (1) "reset" pandas.DataFrame metadata to agree with the pyarrow schema, and (2) to cast cudf.DataFrame partitions to the "correct" dtypes at IO time. In both cases, the pd/cudf.DataFrame columns cannot be cast to cudf list and/or struct columns. Therefore, this PR simply adds a simpole check to avoid casting for list/struct dtypes. We also add a new test (test_cudf_dtypes_from_pandas) to add test coverage for the original bug.

@rjzamora rjzamora added bug Something isn't working 2 - In Progress Currently a work in progress dask Dask issue non-breaking Non-breaking change labels Sep 1, 2021
@rjzamora rjzamora self-assigned this Sep 1, 2021
@rjzamora rjzamora requested a review from a team as a code owner September 1, 2021 17:14
@github-actions github-actions bot added the Python Affects Python cuDF API. label Sep 1, 2021
@codecov
Copy link

codecov bot commented Sep 1, 2021

Codecov Report

❗ No coverage uploaded for pull request base (branch-21.10@1935a8a). Click here to learn what that means.
The diff coverage is n/a.

❗ Current head e5096b6 differs from pull request most recent head 0b60f21. Consider uploading reports for the commit 0b60f21 to get more accurate results
Impacted file tree graph

@@               Coverage Diff               @@
##             branch-21.10    #9159   +/-   ##
===============================================
  Coverage                ?   10.85%           
===============================================
  Files                   ?      115           
  Lines                   ?    18742           
  Branches                ?        0           
===============================================
  Hits                    ?     2034           
  Misses                  ?    16708           
  Partials                ?        0           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1935a8a...0b60f21. Read the comment docs.

@rjzamora rjzamora added 3 - Ready for Review Ready for review by team and removed 2 - In Progress Currently a work in progress labels Sep 1, 2021
galipremsagar added a commit to galipremsagar/cudf that referenced this pull request Sep 14, 2021
@rjzamora
Copy link
Member Author

Closing in favor of #9203

@rjzamora rjzamora closed this Sep 14, 2021
rapids-bot bot pushed a commit that referenced this pull request Sep 30, 2021
A similar fix for this problem was recently submitted in #9159 and closed in favor of #9203. It seems that the test added in the latter PR was not actually capturing the original problem. However, after [dask#8072](dask/dask#8072) is merged, the new test will certainly start failing.

Authors:
  - Richard (Rick) Zamora (https://github.com/rjzamora)

Approvers:
  - GALI PREM SAGAR (https://github.com/galipremsagar)
  - Benjamin Zaitlen (https://github.com/quasiben)

URL: #9314
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 - Ready for Review Ready for review by team bug Something isn't working dask Dask issue non-breaking Non-breaking change Python Affects Python cuDF API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant