You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Aiden Gong (Jira)" <ji...@apache.org> on 2021/11/04 09:39:00 UTC
[jira] [Comment Edited] (KAFKA-13433) JsonConverter's method
convertToJson when field is optional with default value and value is null,
return default value.
[ https://issues.apache.org/jira/browse/KAFKA-13433?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17438556#comment-17438556 ]
Aiden Gong edited comment on KAFKA-13433 at 11/4/21, 9:38 AM:
--------------------------------------------------------------
Class org.apache.kafka.connect.json.JsonConverter line 704, should use 'struct.getWithoutDefault(field)' instead of 'struct.get(field.name())' .
was (Author: aiden gong):
Class org.apache.kafka.connect.json.JsonConverter line 704, should use 'struct.getWithoutDefault(field)' instead of 'struct.get(field)' .
> JsonConverter's method convertToJson when field is optional with default value and value is null, return default value.
> ------------------------------------------------------------------------------------------------------------------------
>
> Key: KAFKA-13433
> URL: https://issues.apache.org/jira/browse/KAFKA-13433
> Project: Kafka
> Issue Type: Bug
> Components: KafkaConnect
> Affects Versions: 3.0.0
> Reporter: Aiden Gong
> Priority: Major
> Labels: connect
> Attachments: image-2021-11-04-16-25-18-890.png, image-2021-11-04-16-25-18-975.png
>
>
> JsonConverter's method convertToJson when field is optional with default value and value is null, return default value. Please refer attachments for more detail.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)