Skip to content

[SPARK-27778][PYTHON] Fix toPandas conversion of empty DataFrame with Arrow enabled #625

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

Merged
merged 1 commit into from
Nov 22, 2019
Merged

[SPARK-27778][PYTHON] Fix toPandas conversion of empty DataFrame with Arrow enabled #625

merged 1 commit into from
Nov 22, 2019

Conversation

dvogelbacher
Copy link

What changes were proposed in this pull request?

apache#22275 introduced a performance improvement where we send partitions out of order to python and then, as a last step, send the partition order as well.
However, if there are no partitions we will never send the partition order and we will get an "EofError" on the python side.
This PR fixes this by also sending the partition order if there are no partitions present.

How was this patch tested?

New unit test added.

… Arrow enabled

## What changes were proposed in this pull request?
apache#22275 introduced a performance improvement where we send partitions out of order to python and then, as a last step, send the partition order as well.
However, if there are no partitions we will never send the partition order and we will get an "EofError" on the python side.
This PR fixes this by also sending the partition order if there are no partitions present.

## How was this patch tested?
New unit test added.

Closes apache#24650 from dvogelbacher/dv/fixNoPartitionArrowConversion.

Authored-by: David Vogelbacher <[email protected]>
Signed-off-by: HyukjinKwon <[email protected]>
@dvogelbacher
Copy link
Author

Cherry-pick of apache#24650

@bulldozer-bot bulldozer-bot bot merged commit 956a4fd into palantir:master Nov 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants