@Override
        protected int getSqlType(Class<?> javaClass) { // and purpose(e.g. for read or write?)
            final int sqlType;
            if (javaClass == boolean.class || javaClass == Boolean.class) {
                sqlType = Types.BOOLEAN;
            } else if (javaClass == byte.class || javaClass == Byte.class) {
                sqlType = Types.TINYINT;
            } else if (javaClass == short.class || javaClass == Short.class || javaClass == int.class
                    || javaClass == Integer.class) {
                sqlType = Types.INTEGER;
            } else if (javaClass == long.class || javaClass == Long.class) {
                sqlType = Types.BIGINT;
            } else if (javaClass == float.class || javaClass == Float.class) {
                sqlType = Types.FLOAT;
            } else if (javaClass == double.class || javaClass == Double.class) {
                sqlType = Types.DOUBLE;
            } else if (javaClass == BigInteger.class || javaClass == BigDecimal.class) {
                sqlType = Types.DECIMAL;
            } else if (javaClass == Date.class || javaClass == LocalDate.class) {
                sqlType = Types.DATE;
            } else if (javaClass == Time.class || javaClass == LocalTime.class) {
                sqlType = Types.TIME;
            } else if (javaClass == Timestamp.class || javaClass == LocalDateTime.class
                    || javaClass == OffsetDateTime.class || javaClass == ZonedDateTime.class) {
                sqlType = Types.TIMESTAMP;
            } else if (javaClass == String.class || javaClass == byte[].class
                    || Enum.class.isAssignableFrom(javaClass)) {
                sqlType = Types.VARCHAR;
            } else if (javaClass.isArray()) { // could be Nested type
                sqlType = Types.ARRAY;
            } else if (List.class.isAssignableFrom(javaClass) || Map.class.isAssignableFrom(javaClass)) {
                sqlType = Types.STRUCT;
            } else {
                sqlType = Types.OTHER;
            }
            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