Add docs. [#CLICKHOUSE-3084]

This commit is contained in:
Vitaliy Lyudvichenko 2017-07-24 16:51:22 +03:00 committed by alexey-milovidov
parent 870b1aefcb
commit ceaac43707
2 changed files with 10 additions and 4 deletions

View File

@ -87,11 +87,14 @@ You should use the ``uniqExact`` function if you definitely need an exact result
The ``uniqExact`` function uses more memory than the ``uniq`` function, because the size of the state has unbounded growth as the number of different values increases.
groupArray(x)
-------------
groupArray(x), groupArray(max_size)(x)
--------------------------------------
Creates an array of argument values.
Values can be added to the array in any (indeterminate) order.
The second version (with ``max_size`` parameter) limits the size of resulting array to ``max_size`` elements.
For example, ``groupArray(1)(x)`` is equivalent to ``[any(x)]``.
In some cases, you can rely on the order of execution. This applies to cases when ``SELECT`` comes from a subquery that uses ``ORDER BY``.
groupUniqArray(x)

View File

@ -86,11 +86,14 @@ uniqExact(x)
Функция ``uniqExact`` расходует больше оперативки, чем функция ``uniq``, так как размер состояния неограниченно растёт по мере роста количества различных значений.
groupArray(x)
-------------
groupArray(x), groupArray(max_size)(x)
--------------------------------------
Составляет массив из значений аргумента.
Значения в массив могут быть добавлены в любом (недетерминированном) порядке.
Вторая версия (с параметром ``max_size``) ограничивает размер результирующего массива ``max_size`` элементами.
Например, ``groupArray(1)(x)`` эквивалентно ``[any(x)]``.
В некоторых случаях, вы всё же можете рассчитывать на порядок выполнения запроса. Это — случаи, когда ``SELECT`` идёт из подзапроса, в котором используется ``ORDER BY``.
groupUniqArray(x)