You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Ksolves India Limited (Jira)" <ji...@apache.org> on 2025/06/16 12:39:00 UTC

[jira] [Commented] (KAFKA-16870) Values.parseString returns objects which fail ConnectSchema.validateValue

    [ https://issues.apache.org/jira/browse/KAFKA-16870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17979233#comment-17979233 ] 

Ksolves India Limited commented on KAFKA-16870:
-----------------------------------------------

Hi [~gharris1727] 
Can you describe the statement "produces bad data"?

Can you add some sample inputs/outputs.

> 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
>            Priority: Major
>
> 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)