Small fix

This commit is contained in:
Dmitry Novik 2022-07-11 18:14:49 +00:00
parent 66074b3950
commit 29cfe33ed7

View File

@ -1513,10 +1513,10 @@ void SelectQueryExpressionAnalyzer::appendGroupByModifiers(ActionsDAGPtr & befor
for (const auto & source_column : source_columns) for (const auto & source_column : source_columns)
{ {
if (isAggregateFunction(source_column.type)) if (source_column.type->canBeInsideNullable())
result_columns.push_back(source_column);
else
result_columns.emplace_back(makeNullableSafe(source_column.type), source_column.name); result_columns.emplace_back(makeNullableSafe(source_column.type), source_column.name);
else
result_columns.push_back(source_column);
} }
ExpressionActionsChain::Step & step = chain.lastStep(before_aggregation->getNamesAndTypesList()); ExpressionActionsChain::Step & step = chain.lastStep(before_aggregation->getNamesAndTypesList());