[ https://issues.apache.org/jira/browse/KAFKA-10457?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17794854#comment-17794854 ]
Waleed Fateem commented on KAFKA-10457: --------------------------------------- [~sagarrao] we ran into this issue recently. In our scenario, the data is coming from IoT devices in JSON format without any schema. There's no control over the data. I believe the user ended up having to use the string converter instead. > 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.20.10#820010)