[ https://issues.apache.org/jira/browse/KAFKA-10457?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17211260#comment-17211260 ]
Bill Bejeck edited comment on KAFKA-10457 at 10/9/20, 6:24 PM: --------------------------------------------------------------- Since this is not a blocker, as part of the 2.7.0 release process removing the "fix version". When there is a PR for this issue we can set "fix version" at that point. If I'm in error about this JIra, please post a comment to the "[DISCUSS] 2.7.0 Release" email thread. was (Author: bbejeck): Since this is not a blocker, as part of the 2.7.0 release process removing the "fix version". When there is a PR for this issue we can set "fix version" at that point. > JsonConverter.toConnectData trims BigInteger to Long for schema-less case > ------------------------------------------------------------------------- > > Key: KAFKA-10457 > URL: https://issues.apache.org/jira/browse/KAFKA-10457 > Project: Kafka > Issue Type: Bug > Components: KafkaConnect > Reporter: Oleksandr Diachenko > Assignee: Oleksandr Diachenko > Priority: Critical > > > When _JsonConverter_ is configured with _schemas.enable=false_ and value, > exceeding _Double_ is passed, the result is incorrect since the converter > trims it to _Double:_ > {code:java} > Map<String, Boolean> props = Collections.singletonMap("schemas.enable", > false); > converter.configure(props, true); > BigInteger value = BigInteger.valueOf(Long.MAX_VALUE).add(new > BigInteger("1")); > String msg = value.toString(); > SchemaAndValue schemaAndValue = converter.toConnectData(TOPIC, > msg.getBytes()); > assertNull(schemaAndValue.schema()); > assertEquals(value, schemaAndValue.value()); > {code} > > Fails with: > > {code:java} > expected:<9223372036854775808> but was:<-9223372036854775808> > Expected :9223372036854775808 > Actual :-9223372036854775808 > {code} > > -- This message was sent by Atlassian Jira (v8.3.4#803005)