mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 15:42:02 +00:00
Allow Array/OrNull combinators regardless nesting
This commit is contained in:
parent
1e7714d56d
commit
d8bf2f81ec
@ -180,9 +180,21 @@ AggregateFunctionPtr AggregateFunctionFactory::getImpl(
|
||||
/// need to filter aggregation result based on another column for
|
||||
/// example.
|
||||
if (nested_name.ends_with(combinator_name))
|
||||
throw Exception(ErrorCodes::ILLEGAL_AGGREGATION,
|
||||
"Nested identical combinator '{}' is not supported",
|
||||
combinator_name);
|
||||
{
|
||||
/// But the following combinators are allowed regardless nesting:
|
||||
/// - Array
|
||||
/// - OrNull (due to aggregate_functions_null_for_empty)
|
||||
if (combinator_name == "Array" || combinator_name == "OrNull")
|
||||
{
|
||||
/// Is supported.
|
||||
}
|
||||
else
|
||||
{
|
||||
throw Exception(ErrorCodes::ILLEGAL_AGGREGATION,
|
||||
"Nested identical combinator '{}' is not supported",
|
||||
combinator_name);
|
||||
}
|
||||
}
|
||||
|
||||
DataTypes nested_types = combinator->transformArguments(argument_types);
|
||||
Array nested_parameters = combinator->transformParameters(parameters);
|
||||
|
Loading…
Reference in New Issue
Block a user