tests with distributed

This commit is contained in:
Anton Popov 2020-06-26 01:39:54 +03:00
parent 14e09e5650
commit 685d14863b
3 changed files with 8 additions and 2 deletions

View File

@ -115,10 +115,8 @@ struct AggregateFunctionDistinctMultipleGenericData : public AggregateFunctionDi
{
const char * begin = nullptr;
StringRef value(begin, 0);
SipHash hash;
for (size_t i = 0; i < columns_num; ++i)
{
columns[i]->updateHashWithValue(row_num, hash);
auto cur_ref = columns[i]->serializeValueIntoArena(row_num, *arena, begin);
value.data = cur_ref.data - value.size;
value.size += cur_ref.size;

View File

@ -0,0 +1,4 @@
78
[0,1,2,3,4,5,6,7,8,9,10,11,12]
20
0.49237

View File

@ -0,0 +1,4 @@
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)));