fix arguments count in FunctionModelEvaluate [#CLICKHOUSE-3305]

This commit is contained in:
Nikolai Kochetov 2017-10-20 12:52:36 +03:00
parent 9384bfdc28
commit e23e15dba8

View File

@ -47,9 +47,10 @@ void FunctionModelEvaluate::executeImpl(Block & block, const ColumnNumbers & arg
auto model = models.getModel(name_col->getValue<String>());
Columns columns(arguments.size() - 1);
for (auto i : ext::range(0, columns.size()))
columns[i] = block.getByPosition(arguments[i + 1]).column;
Columns columns;
columns.reserve(arguments.size());
for (auto i : ext::range(1, arguments.size()))
columns.push_back(block.getByPosition(arguments[i]).column);
block.getByPosition(result).column = model->evaluate(columns);
}