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

[SPARK-41833][SPARK-41881][SPARK-41815][CONNECT][PYTHON] Make DataFrame.collect handle None/NaN/Array/Binary porperly #39386

Closed
wants to merge 1 commit into from

Conversation

zhengruifeng
Copy link
Contributor

@zhengruifeng zhengruifeng commented Jan 4, 2023

What changes were proposed in this pull request?

Existing DataFrame.collect directly collect coming Arrow batches into a Pandas DataFrame, and then convert each series into a Row, which is problematic since it can not correctly handle None/NaN/Arrays/Binary/etc.

This PR refactor DataFrame.collect by directly building rows from the raw Arrow Table, in order to support:
1, None/NaN values;
2, ArrayType
3, BinaryType

Why are the changes needed?

To be consistent with PySpark

Does this PR introduce any user-facing change?

yes

How was this patch tested?

enabled doctests

@zhengruifeng zhengruifeng changed the title [SPARK-41833][CONNECT][PYTHON] Make DataFrame.collect handle ArrayType and BinaryType porperly [SPARK-41833][CONNECT][PYTHON][WIP] Make DataFrame.collect handle ArrayType and BinaryType porperly Jan 4, 2023
@zhengruifeng zhengruifeng changed the title [SPARK-41833][CONNECT][PYTHON][WIP] Make DataFrame.collect handle ArrayType and BinaryType porperly [SPARK-41833][SPARK-41881][SPARK-41815][CONNECT][PYTHON] Make DataFrame.collect handle None/NaN/Array/Binary porperly Jan 4, 2023
fix

fix

fix

fix
@zhengruifeng
Copy link
Contributor Author

cc @HyukjinKwon @grundprinzip

@HyukjinKwon
Copy link
Member

Merged to master.

@zhengruifeng zhengruifeng deleted the connect_fix_41833 branch January 5, 2023 00:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants