Skip to content

Commit

Permalink
Fixed error when IN is used as an aggregation key [#CLICKHOUSE-3855]
Browse files Browse the repository at this point in the history
  • Loading branch information
alexey-milovidov committed Jul 27, 2018
1 parent e64c221 commit bbdd780
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dbms/src/Interpreters/ExpressionAnalyzer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ void ExpressionAnalyzer::analyzeAggregation()
const auto & col = block.getByName(column_name);

/// Constant expressions have non-null column pointer at this stage.
if (const auto is_constexpr = col.column)
if (col.column && col.column->isColumnConst())
{
/// But don't remove last key column if no aggregate functions, otherwise aggregation will not work.
if (!aggregate_descriptions.empty() || size > 1)
Expand Down

0 comments on commit bbdd780

Please sign in to comment.