@Override
        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:
                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 Float32:
                    sqlType = Types.FLOAT;
                    break;
                case Float64:
                    sqlType = Types.DOUBLE;
                    break;
                case UInt64:
                case Int128:
                case UInt128:
                case Int256:
                case UInt256:
                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 = 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;
        }
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