mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 23:52:03 +00:00
Don not add const group by key for query with only having.
This commit is contained in:
parent
a5f1185197
commit
f4b47ca194
@ -90,12 +90,7 @@ void optimizeGroupBy(ASTSelectQuery * select_query, const NameSet & source_colum
|
||||
const FunctionFactory & function_factory = FunctionFactory::instance();
|
||||
|
||||
if (!select_query->groupBy())
|
||||
{
|
||||
// If there is a HAVING clause without GROUP BY, make sure we have some aggregation happen.
|
||||
if (select_query->having())
|
||||
appendUnusedGroupByColumn(select_query, source_columns);
|
||||
return;
|
||||
}
|
||||
|
||||
const auto is_literal = [] (const ASTPtr & ast) -> bool
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user