@Override
    @SuppressWarnings("unchecked")
    public ClickHouseArrayValue<T> update(ClickHouseValue value) {
        if (value == null || value.isNullOrEmpty()) {
            return resetToNullOrEmpty();
        } else if (value instanceof ClickHouseArrayValue) {
            set(((ClickHouseArrayValue<T>) value).getValue());
        } else {
            set(value.isNullOrEmpty() ? (T[]) ClickHouseValues.EMPTY_OBJECT_ARRAY : (T[]) value.asArray());
        }
        return this;
    }
Update value of the given object or create a new instance if {@code ref} is
null.

@param <T>   type of element
@param ref   object to update, could be null
@param value value
@return same object as {@code ref} or a new instance if it's null
clickhouse-data/src/main/java/com/clickhouse/data/value/ClickHouseArrayValue.java