-
Notifications
You must be signed in to change notification settings - Fork 29.1k
[SPARK-54969][PYTHON] Implement new arrow->pandas conversion #54105
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
Conversation
JIRA Issue Information=== Sub-task SPARK-54969 === This comment was automatically generated by GitHub Actions |
f222c20 to
54f9f43
Compare
| Converted pandas Series. If df_for_struct is True and the type is StructType, | ||
| returns a DataFrame with columns corresponding to struct fields. | ||
| """ | ||
| if cls._prefer_convert_numpy(target_type, df_for_struct): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
our target is to replace convert_legacy with convert_numpy
|
cc @fangchenli and @Yicong-Huang the new conversion is to replace |
python/pyspark/sql/conversion.py
Outdated
| ), | ||
| ): | ||
| # TODO(ruifeng): revisit date_as_object | ||
| # TODO(ruifeng): implement coerce_temporal_nanoseconds |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you convert this to the community style, TODO(SPARK-XXX), instead of personal TODO style?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure!
dongjoon-hyun
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, LGTM. Thank you!
|
thanks, merged to master |
What changes were proposed in this pull request?
Implement new arrow->pandas conversion
Why are the changes needed?
to replace existing conversion, based on my local test, the conversion of integers with nulls is 3x+ faster:
conversion used in
convert_legacynew conversion
Does this PR introduce any user-facing change?
no
How was this patch tested?
ci
Was this patch authored or co-authored using generative AI tooling?
no