Closed
Conversation
Contributor
|
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 |
akuzm
reviewed
May 28, 2020
|
|
||
| void add(AggregateDataPtr place, const IColumn ** columns, size_t row_num, Arena * arena) const override | ||
| { | ||
| std::call_once(data(place).initialized, [this, place, columns]() { |
Contributor
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?
Contributor
|
It is probably good to name it as |
qoega
reviewed
Jun 2, 2020
Comment on lines
+1
to
+3
| 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); |
Member
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.
Contributor
| using Array = std::vector<IColumn*>; | ||
|
|
||
| Array value; | ||
| std::once_flag initialized; |
Member
There was a problem hiding this comment.
The proposed variant of implementation is not the correct way to implement this task.
Member
|
We can implement it again in the following way:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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