mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 08:40:50 +00:00
Updated tests
This commit is contained in:
parent
3b24c39294
commit
3a252cd3a0
@ -60,11 +60,17 @@ void InterpreterCreateFunctionQuery::validateFunction(ASTPtr function, const Str
|
||||
auto & lambda_function = function->as<ASTFunction &>();
|
||||
auto & lambda_function_expression_list = lambda_function.arguments->children;
|
||||
|
||||
const auto & tuple_function_arguments = lambda_function_expression_list.at(0)->as<ASTFunction &>();
|
||||
const ASTFunction * tuple_function_arguments = nullptr;
|
||||
|
||||
if (!lambda_function_expression_list.empty())
|
||||
tuple_function_arguments = lambda_function_expression_list[0]->as<ASTFunction>();
|
||||
|
||||
if (!tuple_function_arguments || !tuple_function_arguments->arguments)
|
||||
throw Exception(ErrorCodes::UNSUPPORTED_METHOD, "Lambda must have arguments");
|
||||
|
||||
std::unordered_set<String> arguments;
|
||||
|
||||
for (const auto & argument : tuple_function_arguments.arguments->children)
|
||||
for (const auto & argument : tuple_function_arguments->arguments->children)
|
||||
{
|
||||
const auto * argument_identifier = argument->as<ASTIdentifier>();
|
||||
|
||||
|
@ -1 +1,3 @@
|
||||
CREATE FUNCTION 02181_invalid_lambda AS lambda(((x * 2) AS x_doubled) + x_doubled); --{serverError 1}
|
||||
CREATE FUNCTION 02181_invalid_lambda AS lambda(x); --{serverError 1}
|
||||
CREATE FUNCTION 02181_invalid_lambda AS lambda(); --{serverError 1}
|
Loading…
Reference in New Issue
Block a user