mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
fix usage of 'distinct' combinator with 'state' combinator
This commit is contained in:
parent
3429925338
commit
dcba99f4b1
@ -236,6 +236,11 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
bool isState() const override
|
||||
{
|
||||
return nested_func->isState();
|
||||
}
|
||||
|
||||
AggregateFunctionPtr getNestedFunction() const override { return nested_func; }
|
||||
};
|
||||
|
||||
|
@ -2,3 +2,7 @@
|
||||
[0,1,2,3,4,5,6,7,8,9,10,11,12]
|
||||
20
|
||||
0.49237
|
||||
78
|
||||
[0,1,2,3,4,5,6,7,8,9,10,11,12]
|
||||
20
|
||||
0.49237
|
||||
|
@ -1,3 +1,12 @@
|
||||
SET distributed_aggregation_memory_efficient = 1;
|
||||
|
||||
SELECT sum(DISTINCT number % 13) FROM remote('127.0.0.{1,2}', numbers_mt(100000));
|
||||
SELECT arraySort(groupArray(DISTINCT number % 13)) FROM remote('127.0.0.{1,2}', numbers_mt(100000));
|
||||
SELECT finalizeAggregation(countState(DISTINCT toString(number % 20))) FROM remote('127.0.0.{1,2}', numbers_mt(100000));
|
||||
SELECT round(corrStable(DISTINCT x, y), 5) FROM (SELECT number % 10 AS x, number % 5 AS y FROM remote('127.0.0.{1,2}', numbers(1000)));
|
||||
|
||||
SET distributed_aggregation_memory_efficient = 0;
|
||||
|
||||
SELECT sum(DISTINCT number % 13) FROM remote('127.0.0.{1,2}', numbers_mt(100000));
|
||||
SELECT arraySort(groupArray(DISTINCT number % 13)) FROM remote('127.0.0.{1,2}', numbers_mt(100000));
|
||||
SELECT finalizeAggregation(countState(DISTINCT toString(number % 20))) FROM remote('127.0.0.{1,2}', numbers_mt(100000));
|
||||
|
Loading…
Reference in New Issue
Block a user