ksbeyer opened a new pull request, #52016: URL: https://github.com/apache/spark/pull/52016
### What changes were proposed in this pull request? [SPARK-52772] Simplify DataTypeUtils.canWrite and TableOutputResolver This PR is mostly cleaning up code, but it does have some change (improvement) in plans and minor improvement in how UPDATE handles UDTs. DataTypeUtils.canWrite simplified: - Removed the unused addError message collector. - Eliminate always-true return value. - Rename to verifyCanWrite Simplify TableOutputResolver: - Eliminate dead branches for false on canWrite calls. - Merge duplicate code Make TableOutputResolver consistent on nearly duplicated code paths. - Apply equalsIgnoreCompatibleNullability test from UPDATE to INSERT to avoid restructuring complex types unnecessarily. - Added support for unwrapping UDT in source query of UPDATE to be consistent with INSERT. ### Why are the changes needed? Code readability and consistency. ### Does this PR introduce _any_ user-facing change? No. UPDATE handles UDTs consistent to INSERT, UPDATE is not exposed yet. ### How was this patch tested? - Updated tests to have fewer transforms - Added tests for UDT + update ### 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]
