protected Object getSingleValue() {
        List<Object> value = getValue();

        if (value == null || value.size() != 1) {
            throw new UnsupportedOperationException("Only singleton tuple supports type conversion");
        }

        return value.iterator().next();
    }
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
@return same object as {@code ref} or a new instance if it's null
clickhouse-data/src/main/java/com/clickhouse/data/value/ClickHouseTupleValue.java