Greg Harris created KAFKA-16870:
-----------------------------------
Summary: Values.parseString returns objects which fail
ConnectSchema.validateValue
Key: KAFKA-16870
URL: https://issues.apache.org/jira/browse/KAFKA-16870
Project: Kafka
Issue Type: Task
Components: connect
Reporter: Greg Harris
Values.parseString attempts to parse schema'd data out of blind strings. It
opportunistically parses maps and arrays, and tries to find a common schema
that all values can be cast to.
If parsing succeeds but the values don't have a common schema, the Values class
emits containers with null inner schemas (schemaless elements, keys, or values).
These are not acceptable in ConnectSchema.validateValue, which currently throws
an NPE, and after KAFKA-16858 will throw DataException. We should avoid
producing bad data from the Values class (and the SimpleHeaderConverter which
relies on it) which causes exceptions when used later, for example, as the
value of a Struct.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)