public static SqlPrimitiveType of(final String typeName) {
    switch (typeName.toUpperCase()) {
      case INT:
        return SqlPrimitiveType.of(SqlBaseType.INTEGER);
      case VARCHAR:
        return SqlPrimitiveType.of(SqlBaseType.STRING);
      default:
        try {
          final SqlBaseType sqlType = SqlBaseType.valueOf(typeName.toUpperCase());
          return SqlPrimitiveType.of(sqlType);
        } catch (final IllegalArgumentException e) {
          throw new SchemaException("Unknown primitive type: " + typeName, e);
        }
    }
  }
@Test
  public void shouldSupportSqlPrimitiveTypes() {
    // Given:
    final java.util.Map<String, SqlBaseType> primitives = new ImmutableMap.Builder<String, SqlBaseType>()
        .put("BooleaN", SqlBaseType.BOOLEAN)
        .put("IntegeR", SqlBaseType.INTEGER)
        .put("BigInT", SqlBaseType.BIGINT)
        .put("DoublE", SqlBaseType.DOUBLE)
        .put("StrinG", SqlBaseType.STRING)
        .put("tImeStamP", SqlBaseType.TIMESTAMP)
        .build();

    primitives.forEach((string, expected) ->
        // Then:
        assertThat(SqlPrimitiveType.of(string).baseType(), is(expected))
    );
  }