Yicong-Huang opened a new pull request, #53045: URL: https://github.com/apache/spark/pull/53045
## What changes were proposed in this pull request? This PR merges the Arrow conversion code paths between Spark Connect and Classic Spark by extracting shared logic into a reusable helper function `_convert_arrow_table_to_pandas`. ## Why are the changes needed? This unifies optimizations from two separate PRs: - **[SPARK-53967]** (Classic): Avoid intermediate pandas DataFrame creation by converting Arrow columns directly to Series - **[SPARK-54183]** (Connect): Same optimization implemented for Spark Connect ## Does this PR introduce any user-facing change? No. This is a pure refactoring with no API or behavior changes. ## How was this patch tested? Ran existing Arrow test suite: `python/pyspark/sql/tests/arrow/test_arrow.py` ## Was this patch authored or co-authored using generative AI tooling? Co-Generated-by Cursor with Claude 4.5 Sonnet -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
