Bugfix for parquet metadata writes of empty dataframe partitions (pyarrow) #6741
Merged
martindurant merged 6 commits intodask:masterfrom Oct 27, 2020
Merged
Conversation
added 2 commits
October 16, 2020 00:21
…yarrow parquet metadata writes, causes AttributeError/Segfault
rjzamora
reviewed
Oct 16, 2020
|
|
||
| def test_parquet_pyarrow_write_empty_metadata(tmpdir): | ||
| # https://github.com/dask/dask/issues/6600 | ||
| dd = pytest.importorskip("dask.dataframe") |
Member
There was a problem hiding this comment.
I believe dask.dataframe is already imported as dd in the header, so you shouldn't need this in either of the new tests.
(same with pd)
Contributor
Author
There was a problem hiding this comment.
Thanks, this was lingering after move from a different file (where reqd.)
added 2 commits
October 16, 2020 20:34
UTs homogenous typing for all builds
Member
|
Thanks for the review @rjzamora |
kumarprabhu1988
pushed a commit
to kumarprabhu1988/dask
that referenced
this pull request
Oct 29, 2020
…rrow) (dask#6741) * [bugfix/to-parquet-write-empty-metadata] Filter out null entries in pyarrow parquet metadata writes, causes AttributeError/Segfault * Explicit failure for exception test * [bugfix/to-parquet-write-empty-metadata] black * Remove unnecessary imports UTs homogenous typing for all builds * Placate 3.9 pre-commit * Remove unnecessary scheduler specs Co-authored-by: Callum Noble <C.Noble@mwam.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Attempting to write metadata for empty dataframe partitions with
to_parquet(pyarrow impl.) can raise unintended exceptions or cause segfaults.This PR filters out
Nonemeta data elements generated bywrite_partitionthat cause the issues. Unit tests cases demonstrating the current issue are included.More details in the following comment #6600 (comment)