@Override
    public ClickHouseStringValue update(Object value) {
        if (value instanceof byte[]) {
            return set((byte[]) value);
        } else if (value instanceof String) { // or CharSequence?
            return set((String) value);
        } else if (value instanceof ClickHouseStringValue) {
            ClickHouseStringValue s = (ClickHouseStringValue) value;
            return s.isBinary() ? set(s.asBinary()) : set(s.asString());
        }

        return set(value == null ? null : value.toString());
    }
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 bytes bytes
@return same object as {@code ref} or a new instance if it's null
clickhouse-data/src/main/java/com/clickhouse/data/value/ClickHouseStringValue.java