mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
do not auto-apply -OrNull combinator to pure window functions
This commit is contained in:
parent
56a0e02b4d
commit
1c21281456
@ -88,6 +88,15 @@ AggregateFunctionPtr AggregateFunctionFactory::get(
|
||||
|
||||
AggregateFunctionPtr nested_function = getImpl(
|
||||
name, nested_types, nested_parameters, out_properties, has_null_arguments);
|
||||
|
||||
// Pure window functions are not real aggregate functions. Applying
|
||||
// combinators doesn't make sense for them, they must handle the
|
||||
// nullability themselves.
|
||||
if (nested_function->asWindowFunction())
|
||||
{
|
||||
return nested_function;
|
||||
}
|
||||
|
||||
return combinator->transformAggregateFunction(nested_function, out_properties, type_without_low_cardinality, parameters);
|
||||
}
|
||||
|
||||
|
@ -1054,6 +1054,10 @@ settings max_block_size = 3;
|
||||
13 2 10 12 10 10 143
|
||||
14 2 10 13 10 10 154
|
||||
15 3 15 0 15 15 15
|
||||
-- careful with auto-application of Null combinator
|
||||
select lagInFrame(toNullable(1)) over ();
|
||||
0
|
||||
select lagInFrameOrNull(1) over (); -- { serverError 36 }
|
||||
-- case-insensitive SQL-standard synonyms for any and anyLast
|
||||
select
|
||||
number,
|
||||
|
@ -376,6 +376,10 @@ order by number
|
||||
settings max_block_size = 3;
|
||||
;
|
||||
|
||||
-- careful with auto-application of Null combinator
|
||||
select lagInFrame(toNullable(1)) over ();
|
||||
select lagInFrameOrNull(1) over (); -- { serverError 36 }
|
||||
|
||||
-- case-insensitive SQL-standard synonyms for any and anyLast
|
||||
select
|
||||
number,
|
||||
|
Loading…
Reference in New Issue
Block a user