Open mikebin opened 3 years ago
Hi @mikebin, I was able to verify this and the problem is UNWRAP_SINGLES
is supported by Avro format and when we translate the schema from schema registry to avro format, if UNWRAP_SINGLES
is supported by the format, we wrap it. So the multiple fields in Avro format became a single field and bypassed the check. I think this is a bug which we should fix. If the type is already struct, we shouldn't wrap it I think.
Is your feature request related to a problem? Please describe. Key schema inference between Protobuf and other formats like Avro is not currently consistent. For example, with a simple Protobuf message containing two fields:
With essentially the same schema in Avro:
it works:
The difference appears to be that with Avro, the key schema is wrapped in a single struct field, while with Protobuf, the top level message is unwrapped into separate fields.
Describe the solution you'd like Make behavior for multi-field key schema inference consistent.
Describe alternatives you've considered Defining the key schema explicitly is a workaround for Protobuf: