mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 07:31:57 +00:00
Merge pull request #30177 from CurtizJ/initializeAggregation-nullable
Support nullable arguments in function `initializeAggregation`
This commit is contained in:
commit
78c925ddef
@ -40,6 +40,7 @@ public:
|
||||
bool isSuitableForShortCircuitArgumentsExecution(const DataTypesWithConstInfo & /*arguments*/) const override { return true; }
|
||||
|
||||
bool useDefaultImplementationForConstants() const override { return true; }
|
||||
bool useDefaultImplementationForNulls() const override { return false; }
|
||||
ColumnNumbers getArgumentsThatAreAlwaysConstant() const override { return {0}; }
|
||||
|
||||
DataTypePtr getReturnTypeImpl(const ColumnsWithTypeAndName & arguments) const override;
|
||||
|
@ -0,0 +1,6 @@
|
||||
1
|
||||
AggregateFunction(uniqExact, Nullable(String))
|
||||
1
|
||||
AggregateFunction(uniqExact, Nullable(UInt8))
|
||||
1
|
||||
1
|
@ -0,0 +1,8 @@
|
||||
SELECT finalizeAggregation(initializeAggregation('uniqExactState', toNullable('foo')));
|
||||
SELECT toTypeName(initializeAggregation('uniqExactState', toNullable('foo')));
|
||||
|
||||
SELECT finalizeAggregation(initializeAggregation('uniqExactState', toNullable(123)));
|
||||
SELECT toTypeName(initializeAggregation('uniqExactState', toNullable(123)));
|
||||
|
||||
SELECT initializeAggregation('uniqExactState', toNullable('foo')) = arrayReduce('uniqExactState', [toNullable('foo')]);
|
||||
SELECT initializeAggregation('uniqExactState', toNullable(123)) = arrayReduce('uniqExactState', [toNullable(123)]);
|
Loading…
Reference in New Issue
Block a user