@Override
    public ClickHouseMapValue update(Enum<?> value) {
        Object v;
        if (value == null) {
            v = null;
        } else if (valueType == value.getClass()) {
            v = value;
        } else if (valueType == String.class) {
            v = value.name();
        } else if (keyType == Byte.class) {
            v = Byte.valueOf((byte) value.ordinal());
        } else if (keyType == Short.class) {
            v = Short.valueOf((short) value.ordinal());
        } else if (keyType == Integer.class) {
            v = Integer.valueOf(value.ordinal());
        } else if (keyType == Long.class) {
            v = Long.valueOf(value.ordinal());
        } else if (keyType == Float.class) {
            v = Float.valueOf(value.ordinal());
        } else if (keyType == Double.class) {
            v = Double.valueOf(value.ordinal());
        } else if (keyType == BigInteger.class) {
            v = BigInteger.valueOf(value.ordinal());
        } else if (keyType == BigDecimal.class) {
            v = BigDecimal.valueOf(value.ordinal());
        } else {
            throw newUnsupportedException(value.getClass().getName(), valueType.getName());
        }
        return set(Collections.singletonMap(getDefaultKey(), v));
    }
Update value of the given object or create a new instance if {@code ref} is
null.

@param ref       object to update, could be null
@param value     value
@param keyType   non-null class of key
@param valueType non-null class of value
@return same object as {@code ref} or a new instance if it's null
clickhouse-data/src/main/java/com/clickhouse/data/value/ClickHouseMapValue.java