mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 08:02:02 +00:00
Merge pull request #3097 from zhang2014/fix/ISSUES-3059
ISSUES-3059 fix nullable type argument for aggregate function
This commit is contained in:
commit
481d8f11f1
@ -126,7 +126,7 @@ AggregateFunctionPtr AggregateFunctionFactory::getImpl(
|
||||
|
||||
String nested_name = name.substr(0, name.size() - combinator->getName().size());
|
||||
DataTypes nested_types = combinator->transformArguments(argument_types);
|
||||
AggregateFunctionPtr nested_function = getImpl(nested_name, nested_types, parameters, recursion_level + 1);
|
||||
AggregateFunctionPtr nested_function = get(nested_name, nested_types, parameters, recursion_level + 1);
|
||||
return combinator->transformAggregateFunction(nested_function, argument_types, parameters);
|
||||
}
|
||||
|
||||
|
@ -403,7 +403,6 @@ size_t StorageDistributed::getShardCount() const
|
||||
return getCluster()->getShardCount();
|
||||
}
|
||||
|
||||
|
||||
ClusterPtr StorageDistributed::getCluster() const
|
||||
{
|
||||
return owned_cluster ? owned_cluster : context.getCluster(cluster_name);
|
||||
|
@ -1 +1,2 @@
|
||||
2017-09-10 ['a','b']
|
||||
2017-09-10 [1,2,3,4,5,6,7,NULL]
|
||||
4
|
||||
|
@ -1,6 +1,6 @@
|
||||
USE test;
|
||||
DROP TABLE IF EXISTS test;
|
||||
CREATE TABLE test (date Date, keys Array(Nullable(String))) ENGINE = MergeTree(date, date, 1);
|
||||
INSERT INTO test VALUES ('2017-09-10', ['a', 'b']);
|
||||
SELECT * FROM test LIMIT 1;
|
||||
DROP TABLE test;
|
||||
DROP TABLE IF EXISTS test.test;
|
||||
CREATE TABLE test.test(date Date, keys Array(Nullable(UInt8))) ENGINE = MergeTree(date, date, 1);
|
||||
INSERT INTO test.test VALUES ('2017-09-10', [1, 2, 3, 4, 5, 6, 7, NULL]);
|
||||
SELECT * FROM test.test LIMIT 1;
|
||||
SELECT avgArray(keys) FROM test.test;
|
||||
DROP TABLE test.test;
|
||||
|
Loading…
Reference in New Issue
Block a user