Remove unnecessary emtpy argument check for nth_value as code review suggested

This commit is contained in:
ryzuo 2021-07-26 13:31:45 +08:00
parent 4d36d54c81
commit 0e742487f1

View File

@ -9,6 +9,7 @@
#include <Interpreters/ExpressionActions.h>
#include <Interpreters/convertFieldToType.h>
namespace DB
{
@ -1576,12 +1577,6 @@ struct WindowFunctionNthValue final : public WindowFunction
"Function {} cannot be parameterized", name_);
}
if (argument_types.empty())
{
throw Exception(ErrorCodes::BAD_ARGUMENTS,
"Function {} takes at least one argument", name_);
}
if (argument_types.size() != 2)
{
throw Exception(ErrorCodes::BAD_ARGUMENTS,