mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 01:51:59 +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());
|
String nested_name = name.substr(0, name.size() - combinator->getName().size());
|
||||||
DataTypes nested_types = combinator->transformArguments(argument_types);
|
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);
|
return combinator->transformAggregateFunction(nested_function, argument_types, parameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -403,7 +403,6 @@ size_t StorageDistributed::getShardCount() const
|
|||||||
return getCluster()->getShardCount();
|
return getCluster()->getShardCount();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ClusterPtr StorageDistributed::getCluster() const
|
ClusterPtr StorageDistributed::getCluster() const
|
||||||
{
|
{
|
||||||
return owned_cluster ? owned_cluster : context.getCluster(cluster_name);
|
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.test;
|
||||||
DROP TABLE IF EXISTS test;
|
CREATE TABLE test.test(date Date, keys Array(Nullable(UInt8))) ENGINE = MergeTree(date, date, 1);
|
||||||
CREATE TABLE test (date Date, keys Array(Nullable(String))) ENGINE = MergeTree(date, date, 1);
|
INSERT INTO test.test VALUES ('2017-09-10', [1, 2, 3, 4, 5, 6, 7, NULL]);
|
||||||
INSERT INTO test VALUES ('2017-09-10', ['a', 'b']);
|
SELECT * FROM test.test LIMIT 1;
|
||||||
SELECT * FROM test LIMIT 1;
|
SELECT avgArray(keys) FROM test.test;
|
||||||
DROP TABLE test;
|
DROP TABLE test.test;
|
||||||
|
Loading…
Reference in New Issue
Block a user