private static int scale(Schema schema) {
        String scaleString = schema.parameters().get(SCALE_FIELD);
        if (scaleString == null)
            throw new DataException("Invalid Decimal schema: scale parameter not found.");
        try {
            return Integer.parseInt(scaleString);
        } catch (NumberFormatException e) {
            throw new DataException("Invalid scale parameter found in Decimal schema: ", e);
        }
    }
Convert a value from its encoded format (byte[]) to its logical format ({@link BigDecimal}).
@param value the encoded value
@return the logical value
connect/api/src/main/java/org/apache/kafka/connect/data/Decimal.java