showuon commented on code in PR #20077:
URL: https://github.com/apache/kafka/pull/20077#discussion_r2317632328
##########
connect/json/src/main/java/org/apache/kafka/connect/json/JsonConverter.java:
##########
@@ -152,8 +152,6 @@ public JsonNode toJson(final Schema schema, final Object
value, final JsonConver
return switch (config.decimalFormat()) {
case NUMERIC -> JSON_NODE_FACTORY.numberNode(decimal);
case BASE64 ->
JSON_NODE_FACTORY.binaryNode(Decimal.fromLogical(schema, decimal));
- default ->
- throw new DataException("Unexpected " +
JsonConverterConfig.DECIMAL_FORMAT_CONFIG + ": " + config.decimalFormat());
Review Comment:
Is this change necessary? I think the error should still be thrown if the
format is not expected.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]