mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-26 17:41:59 +00:00
Fixed nullptr dereference [#CLICKHOUSE-3281].
This commit is contained in:
parent
3b6dd67178
commit
452c40e85e
@ -356,7 +356,6 @@ void processHigherOrderFunction(const String & column_name,
|
||||
if (lambda && lambda->name == "lambda")
|
||||
{
|
||||
const DataTypeExpression * lambda_type = typeid_cast<const DataTypeExpression *>(types[i].get());
|
||||
const DataTypes & lambda_argument_types = lambda_type->getArgumentTypes();
|
||||
|
||||
if (!lambda_type)
|
||||
throw Exception("Logical error: IFunction::getLambdaArgumentTypes returned data type for lambda expression,"
|
||||
@ -369,6 +368,8 @@ void processHigherOrderFunction(const String & column_name,
|
||||
|
||||
AnalyzeLambdas::LambdaParameters parameters = AnalyzeLambdas::extractLambdaParameters(lambda->arguments->children[0]);
|
||||
|
||||
const DataTypes & lambda_argument_types = lambda_type->getArgumentTypes();
|
||||
|
||||
if (parameters.size() != lambda_argument_types.size())
|
||||
throw Exception("DataTypeExpression for lambda function has different number of argument types than number of lambda parameters",
|
||||
ErrorCodes::LOGICAL_ERROR);
|
||||
|
Loading…
Reference in New Issue
Block a user