C0urante commented on a change in pull request #11384:
URL: https://github.com/apache/kafka/pull/11384#discussion_r724182155



##########
File path: connect/api/src/main/java/org/apache/kafka/connect/data/Decimal.java
##########
@@ -64,8 +64,14 @@ public static Schema schema(int scale) {
      * @return the encoded value
      */
     public static byte[] fromLogical(Schema schema, BigDecimal value) {
-        if (value.scale() != scale(schema))
-            throw new DataException("BigDecimal has mismatching scale value 
for given Decimal schema");
+        int schemaScale = scale(schema);
+        if (value.scale() != schemaScale)
+            throw new DataException(String.format(
+                "BigDecimal has mismatching scale value for given Decimal 
schema. "

Review comment:
       I tried to keep the same log message as before but just append new 
information to it. Agree that `BigDecimal` is a detail that people reading only 
logs (as opposed to logs in conjunction with source code) won't benefit from; 
can adjust accordingly.




-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to