public static ClickHouseDataType getClickHouseDataType()

in java/clickhouse-client/src/main/java/com/epam/deltix/clickhouse/writer/codec/CodecUtil.java [134:161]


    public static ClickHouseDataType getClickHouseDataType(Class<?> elementType) {
        if (ParseHelper.isStringDataType(elementType)) {
            return ClickHouseDataType.String;
        } else if (ParseHelper.isUInt8DataType(elementType)) {
            return ClickHouseDataType.UInt8;
        } else if (ParseHelper.isInt8DataType(elementType)) {
            return ClickHouseDataType.Int8;
        } else if (ParseHelper.isInt16DataType(elementType)) {
            return ClickHouseDataType.Int16;
        } else if (ParseHelper.isInt32DataType(elementType)) {
            return ClickHouseDataType.Int32;
        } else if (ParseHelper.isInt64DataType(elementType)) {
            return ClickHouseDataType.Int64;
        } else if (ParseHelper.isFloat32DataType(elementType)) {
            return ClickHouseDataType.Float32;
        } else if (ParseHelper.isFloat64DataType(elementType)) {
            return ClickHouseDataType.Float64;
        } else if (ParseHelper.isDecimalDataType(elementType)) {
            return ClickHouseDataType.Decimal;
        } else if (ParseHelper.isDateTimeDataType(elementType)) {
            return ClickHouseDataType.DateTime;
        } else if (ParseHelper.isDateDataType(elementType)) {
            return ClickHouseDataType.Date;
        } else if (elementType.isEnum())
            return ClickHouseDataType.Enum8;

        throw new UnsupportedOperationException(String.format("Unsupported type: %s", elementType));
    }