tomvanbussel opened a new pull request, #46364: URL: https://github.com/apache/spark/pull/46364
### What changes were proposed in this pull request? This PR enables Spark Connect plugins to process `Relation`s and `Expression`s using `SparkConnectPlanner` on the server side and to create `DataFrame`s using `Relation`s on the client side. This has been difficult due to the shading of the protobuf libraries, which meant that Java classes generated for the plugin's Protobuf message usage different base classes than the Java classes for Spark's protobuf messages. This was previously worked around by adding methods that accept a byte array (containing a serialized protobuf message) instead of a protobuf message. Unfortunately, this was not scalable as a lot of methods (such as `DataTypeProtoConverter.toCatalystType`) did not have this alternative. Luckily, we can avoid having to do this as the generated Java classes are not shaded and can still be used from plugins. Instead, plugins should serialize their own version of the generated Java classes for Spark Connect's protobuf messages and then parse them using Spark's (using the `Co nnectProtoUtils` added in this PR). ### Why are the changes needed? Enable the development of Spark Connect plugins. ### 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org