@SuppressWarnings("unchecked")
    default <T> T[] asArray(Class<T> clazz) {
        if (isNullOrEmpty()) {
            return (T[]) ClickHouseValues.EMPTY_OBJECT_ARRAY;
        }

        T[] array = (T[]) Array.newInstance(ClickHouseChecker.nonNull(clazz, ClickHouseValues.TYPE_CLASS), 1);
        array[0] = asObject(clazz);
        return array;
    }
Gets value as an array.

@param <T>   type of the element
@param clazz class of the element
@return non-null array
clickhouse-data/src/main/java/com/clickhouse/data/ClickHouseValue.java