Closed rolanddb closed 2 years ago
Hi, thank you for this useful library.
I have tried to convert the following protobuf:
message ImageRecord { uint64 event_id = 1; uint64 event_timestamp = 2; uint64 capture_timestamp = 3; bytes image = 5; }
However, the bytes are converted to string, as shown with printSchema():
printSchema()
| |-- imageRecord: struct (nullable = true) | | |-- eventId: long (nullable = true) | | |-- eventTimestamp: long (nullable = true) | | |-- captureTimestamp: long (nullable = true) | | |-- image: string (nullable = true)
I managed to get the bytes by doing a unbase64 transformation on the column, but I feel that this is a bug in the library.
unbase64
I think this is because protobuf's MessageToDict converts bytes to b64 encoded strings, but perhaps it should just convert to ByteType.
MessageToDict
ByteType
Hi, thank you for this useful library.
I have tried to convert the following protobuf:
However, the bytes are converted to string, as shown with
printSchema()
:I managed to get the bytes by doing a
unbase64
transformation on the column, but I feel that this is a bug in the library.