I have the following protobuf definition in the schema registry:
message Event {
oneof tx_details {
TxCreated tx_created = 1;
TxPending tx_pending = 2;
}
}
When I create a stream with
CREATE STREAM IF NOT EXISTS events WITH (KAFKA_TOPIC = 'events', VALUE_FORMAT = 'PROTOBUF');
Then the oneof field has the name TX_DETAILS_0 and not TX_DETAILS
Why is that? When I take the statement from DESCRIBE events EXTENDED, remove the _0 from the name and create a new stream with it, the field TX_DETAILS is always null.
Where does this additional _0 in the field name come from? Why is it necessary?
Thanks for any pointers.