class DecimalUtil {

  public static SqlDecimal toSqlDecimal(final SqlType schema) {
    switch (schema.baseType()) {
      case DECIMAL: return (SqlDecimal) schema;
      case INTEGER: return SqlTypes.INT_UPCAST_TO_DECIMAL;
      case BIGINT:  return SqlTypes.BIGINT_UPCAST_TO_DECIMAL;
      default:
        throw new KsqlException(
            "Cannot convert schema of type " + schema.baseType() + " to decimal.");
    }
  }

  private  DecimalUtil();

}