Update ActionsDAG.cpp

This commit is contained in:
Kseniia Sumarokova 2021-06-28 17:09:26 +03:00 committed by GitHub
parent 48d21bb03b
commit 54a7e2158c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -219,8 +219,8 @@ const ActionsDAG::Node & ActionsDAG::addFunction(
column = node.function_base->getConstantResultForNonConstArguments(arguments, node.result_type);
}
if (all_const && column && !isColumnConst(*column) && column->size() <= 1)
column = ColumnConst::create(std::move(column), column->size());
if (all_const && column && !isColumnConst(*column) && column->size() == 1)
column = ColumnConst::create(std::move(column), 1);
/// If the result is not a constant, just in case, we will consider the result as unknown.
if (column && isColumnConst(*column))