code: public static boolean isBigDecimal(Schema schema) {
          if (Type.BYTES == schema.getType()) {
              JsonNode logicalTypeNode = schema.getJsonProp("logicalType");
              if (logicalTypeNode != null
                      && "decimal".equals(logicalTypeNode.asText())) {
                  return true;
              }
          }
          return false;
      }
docs: Tests whether a field is to be externalized as a BigDecimal