You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "ueshin (via GitHub)" <gi...@apache.org> on 2026/03/20 19:15:54 UTC
[PR] [SPARK-56113][PS] Improve pandas 3 string restoration in pandas-on-Spark [spark]
ueshin opened a new pull request, #54926:
URL: https://github.com/apache/spark/pull/54926
### What changes were proposed in this pull request?
This PR updates string restoration in `python/pyspark/pandas/data_type_ops/string_ops.py` so string columns are restored with the pandas dtype carried in the internal field when converting back to pandas in pandas 3 environments.
This improves pandas 3 compatibility for string round-trips and also fixes downstream cases where restored string-related metadata could differ from pandas behavior.
### Why are the changes needed?
pandas 3 is stricter about string dtype restoration and missing-value handling.
In pandas-on-Spark, converting string data back to pandas should preserve the intended pandas dtype instead of falling back to less precise restoration behavior. Without that, pandas 3 comparisons can fail even when the underlying values match.
### Does this PR introduce _any_ user-facing change?
Yes, it will behave more like pandas 3.
### How was this patch tested?
The existing tests should pass.
### Was this patch authored or co-authored using generative AI tooling?
Generated-by: Codex GPT-5
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-56113][PS] Improve pandas 3 string restoration in pandas-on-Spark [spark]
Posted by "HyukjinKwon (via GitHub)" <gi...@apache.org>.
HyukjinKwon commented on PR #54926:
URL: https://github.com/apache/spark/pull/54926#issuecomment-4103182230
Merged to master.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-56113][PS] Improve pandas 3 string restoration in pandas-on-Spark [spark]
Posted by "ueshin (via GitHub)" <gi...@apache.org>.
ueshin commented on PR #54926:
URL: https://github.com/apache/spark/pull/54926#issuecomment-4100453963
cc @gaogaotiantian @HyukjinKwon @zhengruifeng
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-56113][PS] Improve pandas 3 string restoration in pandas-on-Spark [spark]
Posted by "HyukjinKwon (via GitHub)" <gi...@apache.org>.
HyukjinKwon closed pull request #54926: [SPARK-56113][PS] Improve pandas 3 string restoration in pandas-on-Spark
URL: https://github.com/apache/spark/pull/54926
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org