Uh oh!
There was an error while loading. Please reload this page.
[SPARK-48302][PYTHON] Preserve nulls in map columns in PyArrow Tables - #46837
Closed
ianmcook wants to merge 2 commits into
Closed
[SPARK-48302][PYTHON] Preserve nulls in map columns in PyArrow Tables#46837ianmcook wants to merge 2 commits into
ianmcook wants to merge 2 commits into
Conversation
ianmcook
commented
Jun 2, 2024
MemberAuthor
@jorisvandenbossche does this look OK to you? |
HyukjinKwon
approved these changes
Jun 7, 2024
HyukjinKwon
commented
Jun 7, 2024
Member
@ianmcook let's just merge this. I think it's fine |
ianmcook
marked this pull request as ready for review
June 7, 2024 02:24
ianmcook
commented
Jun 15, 2024
MemberAuthor
On the PyArrow side there were some issues with the initial implementation of this, but they are fixed now in apache/arrow#41956 and will be released in version 17.0.0. So I think this PR is good to merge. |
HyukjinKwon
commented
Jun 16, 2024
Member
Merged to master. |
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 freeto 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.
What changes were proposed in this pull request?
This is a small follow-up to #46529. It fixes a known issue affecting PyArrow Tables passed to
spark.createDataFrame(). After this PR, if the user is running PyArrow 17.0.0 or higher, null values in MapArray columns containing nested fields or timestamps will be preserved.Why are the changes needed?
Before this PR, null values in MapArray columns containing nested fields or timestamps are replaced by empty lists when a PyArrow Table is passed to
spark.createDataFrame().Does this PR introduce any user-facing change?
It prevents loss of nulls in the case described above. There are no other user-facing changes.
How was this patch tested?
A test is included.
Was this patch authored or co-authored using generative AI tooling?
No