Fixes bytes encoding. We are using a ByteType which is for a single byte (!). We actually want to use BinaryType for the proto bytes type. This also fixes the encoding to cast the bytearray to the bytes type.
Fixes message decoding. Previously we were returning new messages but that's not how decoding works (!). The Parser's ConvertMessage is passed a message instance, and the parsing function should populate it, rather than return a new one.
Use protobuf's constants for timestamp conversion. Previously we were copying code but now we just reference the objects from the well_known_types module.
Fix the encoder to convert spark Rows to dictionaries.
Fix the roundtrip test. Actually assert that the resulting data is the same as the original.
bytearray
to thebytes
type.ConvertMessage
is passed a message instance, and the parsing function should populate it, rather than return a new one.well_known_types
module.