static Map<ClickHouseDataType, Set<Class<?>>> dataTypeClassMap() {
        Map<ClickHouseDataType, Set<Class<?>>> map = new HashMap<>();

        // We allow to write short to UInt8 even it may not fit. It is done because we have to allow users to utilize UInt* data types.
        List<Class<?>> allNumberClassesOrderedBySize = Arrays.asList(byte.class, Byte.class, short.class, Short.class, int.class, Integer.class, long.class, Long.class, BigInteger.class);
        Set<Class<?>> setOfAllNumberClasses = Collections.unmodifiableSet(new HashSet<>(allNumberClassesOrderedBySize));
        map.put(UInt256, setOfAllNumberClasses);
        map.put(Int256, setOfAllNumberClasses);
        map.put(UInt128, setOfAllNumberClasses);
        map.put(Int128, setOfAllNumberClasses);
        map.put(UInt64, setOfAllNumberClasses);

        map.put(Int64, setOf(byte.class, Byte.class, short.class, Short.class, int.class, Integer.class, long.class, Long.class));
        map.put(UInt32, setOf(byte.class, Byte.class, short.class, Short.class, int.class, Integer.class, long.class, Long.class ));
        map.put(Int32, setOf(byte.class, Byte.class, short.class, Short.class, int.class, Integer.class));
        map.put(UInt16, setOf(byte.class, Byte.class, short.class, Short.class, int.class, Integer.class));
        map.put(Int16, setOf(byte.class, Byte.class, short.class, Short.class));
        map.put(UInt8, setOf(byte.class, Byte.class, short.class, Short.class));
        map.put(Int8, setOf(byte.class, Byte.class));

        map.put(Bool, setOf(boolean.class, Boolean.class));
        map.put(String, setOf(String.class));
        map.put(Float64, setOf(float.class, Float.class, double.class, Double.class));
        map.put(Float32, setOf(float.class, Float.class));
        map.put(Decimal, setOf(float.class, Float.class, double.class, Double.class, BigDecimal.class));
        map.put(Decimal256, setOf(float.class, Float.class, double.class, Double.class, BigDecimal.class));
        map.put(Decimal128, setOf(float.class, Float.class, double.class, Double.class, BigDecimal.class));
        map.put(Decimal64, setOf(float.class, Float.class, double.class, Double.class));
        map.put(Decimal32, setOf(float.class, Float.class));

        map.put(IPv4, setOf(Inet4Address.class));
        map.put(IPv6, setOf(Inet6Address.class));
        map.put(UUID, setOf(java.util.UUID.class));

        map.put(Point, setOf(double[].class, ClickHouseGeoPointValue.class));
        map.put(Ring, setOf(double[][].class, ClickHouseGeoRingValue.class));
        map.put(Polygon, setOf(double[][][].class, ClickHouseGeoPolygonValue.class));
        map.put(MultiPolygon, setOf(double[][][][].class, ClickHouseGeoMultiPolygonValue.class));

        map.put(Date, setOf(LocalDateTime.class, LocalDate.class, ZonedDateTime.class));
        map.put(Date32, setOf(LocalDateTime.class, LocalDate.class, ZonedDateTime.class));
        map.put(DateTime64, setOf(LocalDateTime.class, ZonedDateTime.class));
        map.put(DateTime32, setOf(LocalDateTime.class, ZonedDateTime.class));
        map.put(DateTime, setOf(LocalDateTime.class, ZonedDateTime.class));

        map.put(Enum8, setOf(java.lang.String.class,byte.class, Byte.class, short.class, Short.class, int.class, Integer.class, long.class, Long.class));
        map.put(Enum16, setOf(java.lang.String.class,byte.class, Byte.class, short.class, Short.class, int.class, Integer.class, long.class, Long.class));
        map.put(Array, setOf(List.class, Object[].class, byte[].class, short[].class, int[].class, long[].class, boolean[].class));

        Set<Class<?>> dateIntervalClasses = Collections.unmodifiableSet(new HashSet<>(Arrays.asList(Period.class, Duration.class, byte.class, Byte.class, short.class, Short.class, int.class, Integer.class, long.class, Long.class, BigInteger.class)));
        Set<Class<?>> timeIntervalClasses = Collections.unmodifiableSet(new HashSet<>(Arrays.asList(Duration.class, byte.class, Byte.class, short.class, Short.class, int.class, Integer.class, long.class, Long.class, BigInteger.class)));
        map.put(IntervalYear, dateIntervalClasses);
        map.put(IntervalQuarter, dateIntervalClasses);
        map.put(IntervalMonth, dateIntervalClasses);
        map.put(IntervalWeek, dateIntervalClasses);
        map.put(IntervalDay, dateIntervalClasses);
        map.put(IntervalHour, timeIntervalClasses);
        map.put(IntervalMinute, timeIntervalClasses);
        map.put(IntervalSecond, timeIntervalClasses);
        map.put(IntervalMillisecond, timeIntervalClasses);
        map.put(IntervalMicrosecond, timeIntervalClasses);
        map.put(IntervalNanosecond, timeIntervalClasses);

        return map;
    }
Basic ClickHouse data types.

<p>
This list is based on the list of data type families returned by
{@code SELECT * FROM system.data_type_families}

<p>
{@code LowCardinality} and {@code Nullable} are technically data types in
ClickHouse, but for the sake of this driver, we treat these data types as
modifiers for the underlying base data types.
clickhouse-data/src/main/java/com/clickhouse/data/ClickHouseDataType.java