提交 50f38613 编写于 作者: S Sergey Kononenko

Check arguments count

上级 c339c1ca
......@@ -15,6 +15,7 @@ namespace ErrorCodes
{
extern const int ILLEGAL_COLUMN;
extern const int ILLEGAL_TYPE_OF_ARGUMENT;
extern const int NUMBER_OF_ARGUMENTS_DOESNT_MATCH;
}
......@@ -71,6 +72,10 @@ public:
{
size_t number_of_arguments = arguments.size();
if (number_of_arguments == 0)
throw Exception("Incorrect number of arguments of function " + getName() + ". Must be 1 or 2.",
ErrorCodes::NUMBER_OF_ARGUMENTS_DOESNT_MATCH);
const ColumnAggregateFunction * column_with_states
= typeid_cast<const ColumnAggregateFunction *>(&*block.getByPosition(arguments.at(0)).column);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册