You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2023/01/17 02:04:04 UTC
[GitHub] [spark] rangadi commented on a diff in pull request #39550: [SPARK-42056][SQL][PROTOBUF] Add missing options for Protobuf functions
rangadi commented on code in PR #39550:
URL: https://github.com/apache/spark/pull/39550#discussion_r1071675540
##########
connector/protobuf/src/main/scala/org/apache/spark/sql/protobuf/functions.scala:
##########
@@ -80,14 +81,37 @@ object functions {
*
* @param data
* the binary column.
- * @param shadedMessageClassName
+ * @param messageClassName
* The Protobuf class name. E.g. <code>org.spark.examples.protobuf.ExampleEvent</code>.
* The jar with these classes needs to be shaded as described above.
* @since 3.4.0
*/
@Experimental
- def from_protobuf(data: Column, shadedMessageClassName: String): Column = {
- new Column(ProtobufDataToCatalyst(data.expr, shadedMessageClassName))
+ def from_protobuf(data: Column, messageClassName: String): Column = {
+ new Column(ProtobufDataToCatalyst(data.expr, messageClassName))
+ }
+
+ /**
+ * Converts a binary column of Protobuf format into its corresponding catalyst value. The
+ * specified Protobuf class must match the data, otherwise the behavior is
+ * undefined: it may fail or return arbitrary result. The jar containing Java class should be
+ * shaded. Specifically, `com.google.protobuf.*` should be shaded to
Review Comment:
Do you mean linking to https://github.com/rangadi/shaded-protobuf-classes ?
--
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-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org