Yicong-Huang opened a new pull request, #53987: URL: https://github.com/apache/spark/pull/53987
### What changes were proposed in this pull request? Add `PandasBatchTransformer` class with two static methods: - `wrap_series(series_list)`: Combines Series into DataFrame - `reorder_columns(df, schema)`: Reorders columns by schema field names Use these methods to replace repeated `pd.concat(series, axis=1)` patterns in `worker.py` and `serializers.py`. ### Why are the changes needed? Part of [SPARK-55159](https://issues.apache.org/jira/browse/SPARK-55159). Mirrors `ArrowBatchTransformer` design with pure static functions. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? New unit tests in `test_conversion.py`. Existing grouped map UDF 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]
