-
Bug
-
Resolution: Done
-
Major
-
1.8.1.Final
-
None
-
False
-
None
-
False
Oracle Number : Precision and scale
Oracle allows the scale to be negative.
If you specify a negative scale, Oracle Database rounds the actual data to the specified number of places to the left of the decimal point. For example, specifying (7,-2) means Oracle Database rounds to the nearest hundredths
The `java.math.BigDecimal` scale must be between 0 and the precision 18 (both inclusive).
It gives the following exception:
cause: org.apache.kafka.connect.errors.DataException: BigDecimal has mismatching scale value for given Decimal schema
at org.apache.kafka.connect.data.Decimal.fromLogical(Decimal.java:68)
at org.apache.kafka.connect.json.JsonConverter$1.toJson(JsonConverter.java:157)
at org.apache.kafka.connect.json.JsonConverter.convertToJson(JsonConverter.java:575)
at org.apache.kafka.connect.json.JsonConverter.convertToJson(JsonConverter.java:662)
at org.apache.kafka.connect.json.JsonConverter.convertToJson(JsonConverter.java:662)
at org.apache.kafka.connect.json.JsonConverter.convertToJsonWithEnvelope(JsonConverter.java:550)
at org.apache.kafka.connect.json.JsonConverter.fromConnectData(JsonConverter.java:304)