eddyxu edited a comment on pull request #31735: URL: https://github.com/apache/spark/pull/31735#issuecomment-791125244
Thanks for the reviews, @HyukjinKwon. TLDR, this PR should not introduce performance regression for non-`(pandas_udf + user-defined type)` cases. * For a regular Python UDF, not the arrow-based pandas UDF, this code path is not used. The UDT to StructType conversion only happens in `ArrowStreamPandasUDFSerializer`. * For a pandas UDF with regular spark types, this is guarded by a ["has_udt" flag]( https://github.com/apache/spark/pull/31735/files#diff-f488fb6f95fc62225d12b7895ca4a17081a7de2f6c4dc77272c7bd6694649706R180) . This flag is initialized once during `ArrowStreamPandasUDFSerializer` [creation](https://github.com/apache/spark/pull/31735/files#diff-f488fb6f95fc62225d12b7895ca4a17081a7de2f6c4dc77272c7bd6694649706R120). So for the normal spark types, there should not have performance penalty. Performance wise , i will do some benchmarks and look into a way to erase UDT without much type dispatching. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
