Update docs/en/sql_reference/data_types/nested_data_structures/simpleaggregatefunction.md

Co-Authored-By: Alexander Kuzmenkov <36882414+akuzm@users.noreply.github.com>
This commit is contained in:
Azat Khuzhin 2020-04-17 00:16:45 +03:00 committed by GitHub
parent 68960b59ef
commit ae52067c30
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,9 +2,9 @@
Unlike [`AggregateFunction`](../aggregatefunction.md), which stores not the value of the aggregate function but it's state:
- `SimpleAggregateFunction` data type stores current value of aggregation and does not store aggregation state as [`AggregateFunction`](../aggregatefunction.md).
.
It supports simple stateless aggregate functions, including:
- `SimpleAggregateFunction` data type stores current value of the aggregate function, and does not store its full state as [`AggregateFunction`](../aggregatefunction.md) does. This optimization can be applied to functions for which the following property holds: the result of applying a function `f` to a row set `S1 UNION ALL S2` can be obtained by applying `f` to parts of the row set separately, and then again applying `f` to the results: `f(S1 UNION ALL S2) = f(f(S1) UNION ALL f(S2))`. This property guarantees that partial aggregation results are enough to compute the combined one, so we don't have to store and process any extra data.
Currently, the following aggregate functions are supported:
- [`any`](../../query_language/agg_functions/reference.md#agg_function-any)
- [`anyLast`](../../query_language/agg_functions/reference.md#anylastx)