[
https://issues.apache.org/jira/browse/KAFKA-6651?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16401270#comment-16401270
]
Ewen Cheslack-Postava commented on KAFKA-6651:
--
Could go either way. Based on the comment, I think I originally exposed that
constructor to support use cases that might do something like maintain a
Map to dynamically generate schemas. I don't know
that any actually do that in practice (though since you encountered this
[~jcustenborder] maybe you are using a pattern like that?). I think most that
need something dynamic end up just using a big switch statement with cases for
each type. If nobody uses it, the other option would be to deprecate and remove
that constructor.
> SchemaBuilder should not allow Arrays or Maps to be created by type()
> -
>
> Key: KAFKA-6651
> URL: https://issues.apache.org/jira/browse/KAFKA-6651
> Project: Kafka
> Issue Type: Bug
> Components: KafkaConnect
>Reporter: Jeremy Custenborder
>Priority: Minor
>
> The following code should throw an exception because we cannot set
> valueSchema() or keySchema() once the builder is returned.
> {code:java}
> SchemaBuilder.type(Schema.Type.ARRAY);
> SchemaBuilder.type(Schema.Type.MAP);{code}
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)