Yicong-Huang opened a new pull request, #53963: URL: https://github.com/apache/spark/pull/53963
### What changes were proposed in this pull request? This PR extracts the batch-level arrow to pandas transformation logic from `ArrowStreamPandasSerializer.load_stream` into `ArrowBatchTransformer.to_pandas`. **Changes:** 1. **conversion.py**: Add `ArrowBatchTransformer.to_pandas()` - a factory method that returns a batch-level transformer function `(RecordBatch) -> List[pd.Series]` 2. **serializers.py**: Simplify `ArrowStreamPandasSerializer.load_stream` to use the new transformer. ### Why are the changes needed? This is part of Phase 1 of [SPARK-55159](https://issues.apache.org/jira/browse/SPARK-55159) to improve the composability of Arrow serializers by separating data transformation from serialization. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Existing tests. ### Was this patch authored or co-authored using generative AI tooling? No. -- 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]
