pbspark/_proto.py
def from_protobuf(
        self,
        data: t.Union[Column, str],
        message_type: t.Type[Message],
        options: t.Optional[dict] = None,
    ) -> Column:
        """Deserialize protobuf messages to spark structs.

        Given a column and protobuf message type, deserialize
        protobuf messages also using our custom serializers.

        The ``options`` arg should be a dictionary for the kwargs passed
        our message_to_dict (same args as protobuf's MessageToDict).
        """
        column = col(data) if isinstance(data, str) else data
        protobuf_decoder_udf = self.get_decoder_udf(message_type, options)
        return protobuf_decoder_udf(column)
Deserialize protobuf messages to spark structs.

        Given a column and protobuf message type, deserialize
        protobuf messages also using our custom serializers.

        The ``options`` arg should be a dictionary for the kwargs passed
        our message_to_dict (same args as protobuf's MessageToDict).
        
Deserialize protobuf messages to spark structs.
Given a column and protobuf message type, deserialize
protobuf messages also using our custom serializers.

The ``options`` arg should be a dictionary for the kwargs passed
our message_to_dict (same args as protobuf's MessageToDict).
Deserialize protobuf messages to spark structs . Given a column and protobuf message type deserialize protobuf messages also using our custom serializers . The ` ` options ` ` arg should be a dictionary for the kwargs passed our message_to_dict ( same args as protobuf ' s MessageToDict ) .
def from_protobuf(
        self,
        data: t.Union[Column, str],
        message_type: t.Type[Message],
        options: t.Optional[dict] = None,
    ) -> Column:
        column = col(data) if isinstance(data, str) else data
        protobuf_decoder_udf = self.get_decoder_udf(message_type, options)
        return protobuf_decoder_udf(column)
def from_protobuf ( self , data : t . Union [ Column , str ] , message_type : t . Type [ Message ] , options : t . Optional [ dict ] = None , ) -> Column : column = col ( data ) if isinstance ( data , str ) else data protobuf_decoder_udf = self . get_decoder_udf ( message_type , options ) return protobuf_decoder_udf ( column )
Deserialize protobuf messages to spark structs.
Deserialize protobuf messages to spark structs .
"""Deserialize protobuf messages to spark structs.

        Given a column and protobuf message type, deserialize
        protobuf messages also using our custom serializers.

        The ``options`` arg should be a dictionary for the kwargs passed
        our message_to_dict (same args as protobuf's MessageToDict).
        """
self
data
t.Union[Column, str]
message_type
t.Type[Message]
options
t.Optional[dict]