public int toSqlType(ClickHouseColumn column, Map<String, Class<?>> typeMap) {
        Class<?> javaClass = getCustomJavaClass(column, typeMap);
        if (javaClass != null) {
            return getSqlType(javaClass);
        }

        int sqlType = Types.OTHER;
        switch (column.getDataType()) {
            case Bool:
                sqlType = Types.BOOLEAN;
                break;
            case Int8:
                sqlType = Types.TINYINT;
                break;
            case UInt8:
            case Int16:
                sqlType = Types.SMALLINT;
                break;
            case UInt16:
            case Int32:
                sqlType = Types.INTEGER;
                break;
            case UInt32:
            case IntervalYear:
            case IntervalQuarter:
            case IntervalMonth:
            case IntervalWeek:
            case IntervalDay:
            case IntervalHour:
            case IntervalMinute:
            case IntervalSecond:
            case IntervalMicrosecond:
            case IntervalMillisecond:
            case IntervalNanosecond:
            case Int64:
                sqlType = Types.BIGINT;
                break;
            case UInt64:
            case Int128:
            case UInt128:
            case Int256:
            case UInt256:
                sqlType = Types.NUMERIC;
                break;
            case Float32:
                sqlType = Types.FLOAT;
                break;
            case Float64:
                sqlType = Types.DOUBLE;
                break;
            case Decimal:
            case Decimal32:
            case Decimal64:
            case Decimal128:
            case Decimal256:
                sqlType = Types.DECIMAL;
                break;
            case Date:
            case Date32:
                sqlType = Types.DATE;
                break;
            case DateTime:
            case DateTime32:
            case DateTime64:
                sqlType = column.getTimeZone() != null ? Types.TIMESTAMP_WITH_TIMEZONE : Types.TIMESTAMP;
                break;
            case Enum8:
            case Enum16:
            case IPv4:
            case IPv6:
            case FixedString:
            case JSON:
            case Object:
            case String:
            case UUID:
                sqlType = Types.VARCHAR;
                break;
            case Point:
            case Ring:
            case Polygon:
            case MultiPolygon:
            case Array:
                sqlType = Types.ARRAY;
                break;
            case Map: // Map<?,?>
            case Nested: // Object[][]
            case Tuple: // List<?>
                sqlType = Types.STRUCT;
                break;
            case Nothing:
                sqlType = Types.NULL;
                break;
            default:
                break;
        }

        return sqlType;
    }
Converts {@link ClickHouseColumn} to generic SQL type defined in JDBC.

@param column  non-null column definition
@param typeMap optional custom mapping
@return generic SQL type defined in JDBC
clickhouse-jdbc/src/main/java/com/clickhouse/jdbc/JdbcTypeMapping.java