mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-18 21:51:57 +00:00
Merge branch 'master' of https://github.com/yandex/ClickHouse into CLICKHOUSE-2720
This commit is contained in:
commit
75545c74c8
@ -100,7 +100,7 @@ void InterpreterSelectQuery::init(const BlockInputStreamPtr & input, const Names
|
||||
}
|
||||
}
|
||||
|
||||
if (is_first_select_inside_union_all && hasAsterisk())
|
||||
if (is_first_select_inside_union_all && (hasAsterisk() || hasAggregation(query)))
|
||||
{
|
||||
basicInit(input);
|
||||
|
||||
@ -126,6 +126,15 @@ void InterpreterSelectQuery::init(const BlockInputStreamPtr & input, const Names
|
||||
}
|
||||
}
|
||||
|
||||
bool InterpreterSelectQuery::hasAggregation(const ASTSelectQuery & query_ptr)
|
||||
{
|
||||
for (const ASTSelectQuery * elem = &query_ptr; elem; elem = static_cast<const ASTSelectQuery *>(elem->next_union_all.get()))
|
||||
if (elem->group_expression_list || elem->having_expression)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void InterpreterSelectQuery::basicInit(const BlockInputStreamPtr & input)
|
||||
{
|
||||
auto query_table = query.table();
|
||||
|
@ -96,6 +96,7 @@ private:
|
||||
void init(const BlockInputStreamPtr & input, const Names & required_column_names = Names{});
|
||||
void basicInit(const BlockInputStreamPtr & input);
|
||||
void initQueryAnalyzer();
|
||||
bool hasAggregation(const ASTSelectQuery & query_ptr);
|
||||
|
||||
/// Execute one SELECT query from the UNION ALL chain.
|
||||
void executeSingleQuery();
|
||||
|
@ -165,7 +165,7 @@
|
||||
on the market. It processes hundreds of millions to more than a billion rows and tens of gigabytes of data
|
||||
per single server per second.</p>
|
||||
|
||||
<p>ClickHouse uses all available hardware to it's full potential to process each query as fast as possible. The peak
|
||||
<p>ClickHouse uses all available hardware to its full potential to process each query as fast as possible. The peak
|
||||
processing performance for a single query <span class="grey">(after decompression, only used columns)</span>
|
||||
stands at more than 2 terabytes per second.</p>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user