static String toAnsiSqlType(ClickHouseColumn column, StringBuilder builder) {
            final ClickHouseDataType dataType = column.getDataType();
            final String sqlType;

            if (dataType == ClickHouseDataType.SimpleAggregateFunction) {
                sqlType = column.hasNestedColumn() ? toAnsiSqlType(column.getNestedColumns().get(0), builder)
                        : "BINARY";
            } else if (column.isArray()) {
                sqlType = builder.append("ARRAY").append('(')
                        .append(toAnsiSqlType(column.getArrayBaseColumn(), builder))
                        .append(')').toString();
            } else if (column.isMap()) {
                return builder.append("MAP").append('(').append(toAnsiSqlType(column.getKeyInfo(), builder)).append(',')
                        .append(toAnsiSqlType(column.getValueInfo(), builder))
                        .append(')').toString();
            } else if (column.isNested() || column.isTuple()) {
                builder.append("STRUCT").append('(');
                for (ClickHouseColumn c : column.getNestedColumns()) {
                    builder.append(toAnsiSqlType(c, builder)).append(',');
                }
                builder.setLength(builder.length() - 1);
                sqlType = builder.append(')').toString();
            } else {
                sqlType = toAnsiSqlType(dataType, column.getPrecision(), column.getScale(),
                        column.getTimeZone());
            }
            return sqlType;
        }
This class defines mappings among {@link Types}, {@link JDBCType},
{@link ClickHouseDataType}, {@link ClickHouseColumn}, and {@link Class}. It
does not impact serialization and deserialization, which is handled
separately by {@link com.clickhouse.data.ClickHouseDataProcessor}.
clickhouse-jdbc/src/main/java/com/clickhouse/jdbc/JdbcTypeMapping.java