mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 16:12:01 +00:00
Fix bad test 01605_dictinct_two_level
This commit is contained in:
parent
0b939fae5d
commit
12714d54b2
@ -8,13 +8,13 @@
|
||||
['7']
|
||||
['8']
|
||||
['9']
|
||||
test.com ['foo3223','foo6455','foo382','foo5566','foo1037']
|
||||
test.com0 ['foo0']
|
||||
test.com0.0001 ['foo1']
|
||||
test.com0.0002 ['foo2']
|
||||
test.com0.0003 ['foo3']
|
||||
test.com0.0004 ['foo4']
|
||||
test.com0.0005 ['foo5']
|
||||
test.com0.0006 ['foo6']
|
||||
test.com0.0007 ['foo7']
|
||||
test.com0.0008 ['foo8']
|
||||
test.com 5
|
||||
test.com0 1
|
||||
test.com0.0001 1
|
||||
test.com0.0002 1
|
||||
test.com0.0003 1
|
||||
test.com0.0004 1
|
||||
test.com0.0005 1
|
||||
test.com0.0006 1
|
||||
test.com0.0007 1
|
||||
test.com0.0008 1
|
||||
|
@ -5,21 +5,21 @@ SELECT groupArray(DISTINCT toString(number % 10)) FROM numbers_mt(50000)
|
||||
GROUP BY number ORDER BY number LIMIT 10
|
||||
SETTINGS max_threads = 2, max_block_size = 2000;
|
||||
|
||||
DROP TABLE IF EXISTS dictinct_two_level;
|
||||
DROP TABLE IF EXISTS distinct_two_level;
|
||||
|
||||
CREATE TABLE dictinct_two_level (
|
||||
CREATE TABLE distinct_two_level (
|
||||
time DateTime64(3),
|
||||
domain String,
|
||||
subdomain String
|
||||
) ENGINE = MergeTree ORDER BY time;
|
||||
|
||||
INSERT INTO dictinct_two_level SELECT 1546300800000, 'test.com', concat('foo', toString(number % 10000)) from numbers(10000);
|
||||
INSERT INTO dictinct_two_level SELECT 1546300800000, concat('test.com', toString(number / 10000)) , concat('foo', toString(number % 10000)) from numbers(10000);
|
||||
INSERT INTO distinct_two_level SELECT 1546300800000, 'test.com', concat('foo', toString(number % 10000)) from numbers(10000);
|
||||
INSERT INTO distinct_two_level SELECT 1546300800000, concat('test.com', toString(number / 10000)) , concat('foo', toString(number % 10000)) from numbers(10000);
|
||||
|
||||
SELECT
|
||||
domain, groupArraySample(5, 11111)(DISTINCT subdomain) AS example_subdomains
|
||||
FROM dictinct_two_level
|
||||
domain, arrayUniq(groupArraySample(5, 11111)(DISTINCT subdomain)) AS example_subdomains
|
||||
FROM distinct_two_level
|
||||
GROUP BY domain ORDER BY domain, example_subdomains
|
||||
LIMIT 10;
|
||||
|
||||
DROP TABLE IF EXISTS dictinct_two_level;
|
||||
DROP TABLE IF EXISTS distinct_two_level;
|
||||
|
Loading…
Reference in New Issue
Block a user