Conversation
|
Please add a brief description of what it does to https://github.com/ClickHouse/ClickHouse/blob/master/docs/en/sql-reference/aggregate-functions/combinators.md |
|
|
||
| void add(AggregateDataPtr place, const IColumn ** columns, size_t row_num, Arena * arena) const override | ||
| { | ||
| std::call_once(data(place).initialized, [this, place, columns]() { |
There was a problem hiding this comment.
add is not supposed to be called concurrently on shared data, so the call_once shouldn't be necessary. Or is it?
|
It is probably good to name it as |
| SELECT groupArrayOrderBy(2)(x, y, z) FROM (SELECT number AS x, number % 3 AS y, number % 5 AS z FROM system.numbers LIMIT 10); | ||
| SELECT groupArrayOrderBy(1)(x, y) FROM (SELECT number AS x, number % 3 AS y FROM system.numbers_mt LIMIT 10); | ||
| SELECT groupArrayOrderBy(1)(x, y) FROM (SELECT number AS x, number AS y FROM system.numbers_mt LIMIT 10); |
There was a problem hiding this comment.
- Lets add some other examples if applicable - not only
groupArray. - Negative cases are also useful. Both incorrect column names, and unsupported functions.
| using Array = std::vector<IColumn*>; | ||
|
|
||
| Array value; | ||
| std::once_flag initialized; |
There was a problem hiding this comment.
The proposed variant of implementation is not the correct way to implement this task.
|
We can implement it again in the following way:
|
I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Add -OrderBy combinator && change transformArguments signature