mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Move long queries from 01798_uniq_theta_sketch to separate test
This commit is contained in:
parent
847cd54c6b
commit
ec83aed3eb
@ -313,6 +313,7 @@ function run_tests
|
||||
01542_collate_in_array
|
||||
01543_collate_in_tuple
|
||||
01798_uniq_theta_sketch
|
||||
01799_long_uniq_theta_sketch
|
||||
_orc_
|
||||
arrow
|
||||
avro
|
||||
|
@ -1,217 +1,3 @@
|
||||
uniqThetaSketch
|
||||
1 1
|
||||
3 1
|
||||
6 1
|
||||
7 1
|
||||
9 1
|
||||
11 1
|
||||
14 1
|
||||
17 1
|
||||
19 1
|
||||
20 2
|
||||
26 1
|
||||
31 1
|
||||
35 1
|
||||
36 1
|
||||
0 162
|
||||
1 162
|
||||
3 162
|
||||
6 162
|
||||
7 163
|
||||
9 163
|
||||
10 81
|
||||
11 163
|
||||
13 162
|
||||
14 162
|
||||
17 162
|
||||
19 162
|
||||
20 162
|
||||
21 162
|
||||
22 162
|
||||
26 162
|
||||
31 162
|
||||
35 162
|
||||
36 162
|
||||
0 55018
|
||||
1 54020
|
||||
3 53774
|
||||
6 53947
|
||||
7 53839
|
||||
9 54408
|
||||
10 26876
|
||||
11 54985
|
||||
13 53479
|
||||
14 53516
|
||||
17 53331
|
||||
19 53680
|
||||
20 54211
|
||||
21 53054
|
||||
22 54690
|
||||
26 53716
|
||||
31 54139
|
||||
35 52331
|
||||
36 53766
|
||||
uniqThetaSketch round(float)
|
||||
0.125 1
|
||||
0.5 1
|
||||
0.05 1
|
||||
0.143 1
|
||||
0.056 1
|
||||
0.048 2
|
||||
0.083 1
|
||||
0.25 1
|
||||
0.1 1
|
||||
0.028 1
|
||||
0.027 1
|
||||
0.031 1
|
||||
0.067 1
|
||||
0.037 1
|
||||
0.045 162
|
||||
0.125 163
|
||||
0.5 162
|
||||
0.05 162
|
||||
0.143 162
|
||||
0.091 81
|
||||
0.056 162
|
||||
0.048 162
|
||||
0.083 163
|
||||
0.25 162
|
||||
1 162
|
||||
0.1 163
|
||||
0.028 162
|
||||
0.027 162
|
||||
0.031 162
|
||||
0.067 162
|
||||
0.043 162
|
||||
0.037 162
|
||||
0.071 162
|
||||
0.045 53054
|
||||
0.125 53839
|
||||
0.5 54020
|
||||
0.05 53680
|
||||
0.143 53947
|
||||
0.091 26876
|
||||
0.056 53331
|
||||
0.048 54211
|
||||
0.083 54985
|
||||
0.25 53774
|
||||
1 55018
|
||||
0.1 54408
|
||||
0.028 52331
|
||||
0.027 53766
|
||||
0.031 54139
|
||||
0.067 53516
|
||||
0.043 54690
|
||||
0.037 53716
|
||||
0.071 53479
|
||||
uniqThetaSketch round(toFloat32())
|
||||
0.5 1
|
||||
0.05 1
|
||||
0.25 1
|
||||
0.048 2
|
||||
0.083 1
|
||||
0.125 1
|
||||
0.031 1
|
||||
0.143 1
|
||||
0.028 1
|
||||
0.067 1
|
||||
0.027 1
|
||||
0.056 1
|
||||
0.037 1
|
||||
0.1 1
|
||||
0.5 162
|
||||
0.05 162
|
||||
0.25 162
|
||||
0.048 162
|
||||
0.091 81
|
||||
0.043 162
|
||||
0.071 162
|
||||
0.083 163
|
||||
0.125 163
|
||||
0.031 162
|
||||
0.143 162
|
||||
0.028 162
|
||||
0.067 162
|
||||
0.045 162
|
||||
0.027 162
|
||||
0.056 162
|
||||
0.037 162
|
||||
0.1 163
|
||||
1 162
|
||||
0.5 54020
|
||||
0.05 53680
|
||||
0.25 53774
|
||||
0.048 54211
|
||||
0.091 26876
|
||||
0.043 54690
|
||||
0.071 53479
|
||||
0.083 54985
|
||||
0.125 53839
|
||||
0.031 54139
|
||||
0.143 53947
|
||||
0.028 52331
|
||||
0.067 53516
|
||||
0.045 53054
|
||||
0.027 53766
|
||||
0.056 53331
|
||||
0.037 53716
|
||||
0.1 54408
|
||||
1 55018
|
||||
uniqThetaSketch IPv4NumToString
|
||||
1 1
|
||||
3 1
|
||||
6 1
|
||||
7 1
|
||||
9 1
|
||||
11 1
|
||||
14 1
|
||||
17 1
|
||||
19 1
|
||||
20 2
|
||||
26 1
|
||||
31 1
|
||||
35 1
|
||||
36 1
|
||||
0 162
|
||||
1 162
|
||||
3 162
|
||||
6 162
|
||||
7 163
|
||||
9 163
|
||||
10 81
|
||||
11 163
|
||||
13 162
|
||||
14 162
|
||||
17 162
|
||||
19 162
|
||||
20 162
|
||||
21 162
|
||||
22 162
|
||||
26 162
|
||||
31 162
|
||||
35 162
|
||||
36 162
|
||||
0 54929
|
||||
1 53802
|
||||
3 54706
|
||||
6 54700
|
||||
7 53592
|
||||
9 54036
|
||||
10 27392
|
||||
11 53768
|
||||
13 54566
|
||||
14 53104
|
||||
17 54243
|
||||
19 55003
|
||||
20 53398
|
||||
21 53831
|
||||
22 54603
|
||||
26 54607
|
||||
31 54012
|
||||
35 54826
|
||||
36 54910
|
||||
uniqThetaSketch remote()
|
||||
1
|
||||
uniqThetaSketch many agrs
|
||||
10 10 100 100 1000 1000
|
||||
17 10 10 100 100 610 610 766
|
||||
@ -442,7 +228,3 @@ FROM
|
||||
0 333333 53 53
|
||||
1 333333 53 53
|
||||
2 333333 53 53
|
||||
10000000
|
||||
10021957
|
||||
10021969
|
||||
10094819
|
||||
|
@ -1,33 +1,3 @@
|
||||
DROP TABLE IF EXISTS stored_aggregates;
|
||||
|
||||
SELECT 'uniqThetaSketch';
|
||||
|
||||
SELECT Y, uniqThetaSketch(X) FROM (SELECT number AS X, (3*X*X - 7*X + 11) % 37 AS Y FROM system.numbers LIMIT 15) GROUP BY Y;
|
||||
SELECT Y, uniqThetaSketch(X) FROM (SELECT number AS X, (3*X*X - 7*X + 11) % 37 AS Y FROM system.numbers LIMIT 3000) GROUP BY Y;
|
||||
SELECT Y, uniqThetaSketch(X) FROM (SELECT number AS X, (3*X*X - 7*X + 11) % 37 AS Y FROM system.numbers LIMIT 1000000) GROUP BY Y;
|
||||
|
||||
SELECT 'uniqThetaSketch round(float)';
|
||||
|
||||
SELECT Y, uniqThetaSketch(X) FROM (SELECT number AS X, round(1/(1 + (3*X*X - 7*X + 11) % 37), 3) AS Y FROM system.numbers LIMIT 15) GROUP BY Y;
|
||||
SELECT Y, uniqThetaSketch(X) FROM (SELECT number AS X, round(1/(1 + (3*X*X - 7*X + 11) % 37), 3) AS Y FROM system.numbers LIMIT 3000) GROUP BY Y;
|
||||
SELECT Y, uniqThetaSketch(X) FROM (SELECT number AS X, round(1/(1 + (3*X*X - 7*X + 11) % 37), 3) AS Y FROM system.numbers LIMIT 1000000) GROUP BY Y;
|
||||
|
||||
SELECT 'uniqThetaSketch round(toFloat32())';
|
||||
|
||||
SELECT Y, uniqThetaSketch(X) FROM (SELECT number AS X, round(toFloat32(1/(1 + (3*X*X - 7*X + 11) % 37)), 3) AS Y FROM system.numbers LIMIT 15) GROUP BY Y;
|
||||
SELECT Y, uniqThetaSketch(X) FROM (SELECT number AS X, round(toFloat32(1/(1 + (3*X*X - 7*X + 11) % 37)), 3) AS Y FROM system.numbers LIMIT 3000) GROUP BY Y;
|
||||
SELECT Y, uniqThetaSketch(X) FROM (SELECT number AS X, round(toFloat32(1/(1 + (3*X*X - 7*X + 11) % 37)), 3) AS Y FROM system.numbers LIMIT 1000000) GROUP BY Y;
|
||||
|
||||
SELECT 'uniqThetaSketch IPv4NumToString';
|
||||
|
||||
SELECT Y, uniqThetaSketch(Z) FROM (SELECT number AS X, IPv4NumToString(toUInt32(X)) AS Z, (3*X*X - 7*X + 11) % 37 AS Y FROM system.numbers LIMIT 15) GROUP BY Y;
|
||||
SELECT Y, uniqThetaSketch(Z) FROM (SELECT number AS X, IPv4NumToString(toUInt32(X)) AS Z, (3*X*X - 7*X + 11) % 37 AS Y FROM system.numbers LIMIT 3000) GROUP BY Y;
|
||||
SELECT Y, uniqThetaSketch(Z) FROM (SELECT number AS X, IPv4NumToString(toUInt32(X)) AS Z, (3*X*X - 7*X + 11) % 37 AS Y FROM system.numbers LIMIT 1000000) GROUP BY Y;
|
||||
|
||||
SELECT 'uniqThetaSketch remote()';
|
||||
|
||||
SELECT uniqThetaSketch(dummy) FROM remote('127.0.0.{2,3}', system.one);
|
||||
|
||||
SELECT 'uniqThetaSketch many agrs';
|
||||
|
||||
SELECT
|
||||
@ -130,6 +100,8 @@ EXPLAIN SYNTAX select uniqThetaSketch(bitNot(-x)) from (select number % 2 as x f
|
||||
EXPLAIN SYNTAX select uniqThetaSketch(-bitNot(-x)) from (select number % 2 as x from numbers(10));
|
||||
|
||||
|
||||
DROP TABLE IF EXISTS stored_aggregates;
|
||||
|
||||
-- simple
|
||||
CREATE TABLE stored_aggregates
|
||||
(
|
||||
@ -237,8 +209,3 @@ select k, sum(c), uniqMerge(un), uniqThetaSketchMerge(ut) from summing_merge_tre
|
||||
drop table summing_merge_tree_aggregate_function;
|
||||
drop table summing_merge_tree_null;
|
||||
|
||||
-- precise
|
||||
SELECT uniqExact(number) FROM numbers(1e7);
|
||||
SELECT uniqCombined(number) FROM numbers(1e7);
|
||||
SELECT uniqCombined64(number) FROM numbers(1e7);
|
||||
SELECT uniqThetaSketch(number) FROM numbers(1e7);
|
||||
|
219
tests/queries/0_stateless/01799_long_uniq_theta_sketch.reference
Normal file
219
tests/queries/0_stateless/01799_long_uniq_theta_sketch.reference
Normal file
@ -0,0 +1,219 @@
|
||||
uniqThetaSketch
|
||||
1 1
|
||||
3 1
|
||||
6 1
|
||||
7 1
|
||||
9 1
|
||||
11 1
|
||||
14 1
|
||||
17 1
|
||||
19 1
|
||||
20 2
|
||||
26 1
|
||||
31 1
|
||||
35 1
|
||||
36 1
|
||||
0 162
|
||||
1 162
|
||||
3 162
|
||||
6 162
|
||||
7 163
|
||||
9 163
|
||||
10 81
|
||||
11 163
|
||||
13 162
|
||||
14 162
|
||||
17 162
|
||||
19 162
|
||||
20 162
|
||||
21 162
|
||||
22 162
|
||||
26 162
|
||||
31 162
|
||||
35 162
|
||||
36 162
|
||||
0 55018
|
||||
1 54020
|
||||
3 53774
|
||||
6 53947
|
||||
7 53839
|
||||
9 54408
|
||||
10 26876
|
||||
11 54985
|
||||
13 53479
|
||||
14 53516
|
||||
17 53331
|
||||
19 53680
|
||||
20 54211
|
||||
21 53054
|
||||
22 54690
|
||||
26 53716
|
||||
31 54139
|
||||
35 52331
|
||||
36 53766
|
||||
uniqThetaSketch round(float)
|
||||
0.125 1
|
||||
0.5 1
|
||||
0.05 1
|
||||
0.143 1
|
||||
0.056 1
|
||||
0.048 2
|
||||
0.083 1
|
||||
0.25 1
|
||||
0.1 1
|
||||
0.028 1
|
||||
0.027 1
|
||||
0.031 1
|
||||
0.067 1
|
||||
0.037 1
|
||||
0.045 162
|
||||
0.125 163
|
||||
0.5 162
|
||||
0.05 162
|
||||
0.143 162
|
||||
0.091 81
|
||||
0.056 162
|
||||
0.048 162
|
||||
0.083 163
|
||||
0.25 162
|
||||
1 162
|
||||
0.1 163
|
||||
0.028 162
|
||||
0.027 162
|
||||
0.031 162
|
||||
0.067 162
|
||||
0.043 162
|
||||
0.037 162
|
||||
0.071 162
|
||||
0.045 53054
|
||||
0.125 53839
|
||||
0.5 54020
|
||||
0.05 53680
|
||||
0.143 53947
|
||||
0.091 26876
|
||||
0.056 53331
|
||||
0.048 54211
|
||||
0.083 54985
|
||||
0.25 53774
|
||||
1 55018
|
||||
0.1 54408
|
||||
0.028 52331
|
||||
0.027 53766
|
||||
0.031 54139
|
||||
0.067 53516
|
||||
0.043 54690
|
||||
0.037 53716
|
||||
0.071 53479
|
||||
uniqThetaSketch round(toFloat32())
|
||||
0.5 1
|
||||
0.05 1
|
||||
0.25 1
|
||||
0.048 2
|
||||
0.083 1
|
||||
0.125 1
|
||||
0.031 1
|
||||
0.143 1
|
||||
0.028 1
|
||||
0.067 1
|
||||
0.027 1
|
||||
0.056 1
|
||||
0.037 1
|
||||
0.1 1
|
||||
0.5 162
|
||||
0.05 162
|
||||
0.25 162
|
||||
0.048 162
|
||||
0.091 81
|
||||
0.043 162
|
||||
0.071 162
|
||||
0.083 163
|
||||
0.125 163
|
||||
0.031 162
|
||||
0.143 162
|
||||
0.028 162
|
||||
0.067 162
|
||||
0.045 162
|
||||
0.027 162
|
||||
0.056 162
|
||||
0.037 162
|
||||
0.1 163
|
||||
1 162
|
||||
0.5 54020
|
||||
0.05 53680
|
||||
0.25 53774
|
||||
0.048 54211
|
||||
0.091 26876
|
||||
0.043 54690
|
||||
0.071 53479
|
||||
0.083 54985
|
||||
0.125 53839
|
||||
0.031 54139
|
||||
0.143 53947
|
||||
0.028 52331
|
||||
0.067 53516
|
||||
0.045 53054
|
||||
0.027 53766
|
||||
0.056 53331
|
||||
0.037 53716
|
||||
0.1 54408
|
||||
1 55018
|
||||
uniqThetaSketch IPv4NumToString
|
||||
1 1
|
||||
3 1
|
||||
6 1
|
||||
7 1
|
||||
9 1
|
||||
11 1
|
||||
14 1
|
||||
17 1
|
||||
19 1
|
||||
20 2
|
||||
26 1
|
||||
31 1
|
||||
35 1
|
||||
36 1
|
||||
0 162
|
||||
1 162
|
||||
3 162
|
||||
6 162
|
||||
7 163
|
||||
9 163
|
||||
10 81
|
||||
11 163
|
||||
13 162
|
||||
14 162
|
||||
17 162
|
||||
19 162
|
||||
20 162
|
||||
21 162
|
||||
22 162
|
||||
26 162
|
||||
31 162
|
||||
35 162
|
||||
36 162
|
||||
0 54929
|
||||
1 53802
|
||||
3 54706
|
||||
6 54700
|
||||
7 53592
|
||||
9 54036
|
||||
10 27392
|
||||
11 53768
|
||||
13 54566
|
||||
14 53104
|
||||
17 54243
|
||||
19 55003
|
||||
20 53398
|
||||
21 53831
|
||||
22 54603
|
||||
26 54607
|
||||
31 54012
|
||||
35 54826
|
||||
36 54910
|
||||
uniqThetaSketch remote()
|
||||
1
|
||||
uniqThetaSketch precise
|
||||
10000000
|
||||
10021957
|
||||
10021969
|
||||
10094819
|
35
tests/queries/0_stateless/01799_long_uniq_theta_sketch.sql
Normal file
35
tests/queries/0_stateless/01799_long_uniq_theta_sketch.sql
Normal file
@ -0,0 +1,35 @@
|
||||
SELECT 'uniqThetaSketch';
|
||||
|
||||
SELECT Y, uniqThetaSketch(X) FROM (SELECT number AS X, (3*X*X - 7*X + 11) % 37 AS Y FROM system.numbers LIMIT 15) GROUP BY Y;
|
||||
SELECT Y, uniqThetaSketch(X) FROM (SELECT number AS X, (3*X*X - 7*X + 11) % 37 AS Y FROM system.numbers LIMIT 3000) GROUP BY Y;
|
||||
SELECT Y, uniqThetaSketch(X) FROM (SELECT number AS X, (3*X*X - 7*X + 11) % 37 AS Y FROM system.numbers LIMIT 1000000) GROUP BY Y;
|
||||
|
||||
SELECT 'uniqThetaSketch round(float)';
|
||||
|
||||
SELECT Y, uniqThetaSketch(X) FROM (SELECT number AS X, round(1/(1 + (3*X*X - 7*X + 11) % 37), 3) AS Y FROM system.numbers LIMIT 15) GROUP BY Y;
|
||||
SELECT Y, uniqThetaSketch(X) FROM (SELECT number AS X, round(1/(1 + (3*X*X - 7*X + 11) % 37), 3) AS Y FROM system.numbers LIMIT 3000) GROUP BY Y;
|
||||
SELECT Y, uniqThetaSketch(X) FROM (SELECT number AS X, round(1/(1 + (3*X*X - 7*X + 11) % 37), 3) AS Y FROM system.numbers LIMIT 1000000) GROUP BY Y;
|
||||
|
||||
SELECT 'uniqThetaSketch round(toFloat32())';
|
||||
|
||||
SELECT Y, uniqThetaSketch(X) FROM (SELECT number AS X, round(toFloat32(1/(1 + (3*X*X - 7*X + 11) % 37)), 3) AS Y FROM system.numbers LIMIT 15) GROUP BY Y;
|
||||
SELECT Y, uniqThetaSketch(X) FROM (SELECT number AS X, round(toFloat32(1/(1 + (3*X*X - 7*X + 11) % 37)), 3) AS Y FROM system.numbers LIMIT 3000) GROUP BY Y;
|
||||
SELECT Y, uniqThetaSketch(X) FROM (SELECT number AS X, round(toFloat32(1/(1 + (3*X*X - 7*X + 11) % 37)), 3) AS Y FROM system.numbers LIMIT 1000000) GROUP BY Y;
|
||||
|
||||
SELECT 'uniqThetaSketch IPv4NumToString';
|
||||
|
||||
SELECT Y, uniqThetaSketch(Z) FROM (SELECT number AS X, IPv4NumToString(toUInt32(X)) AS Z, (3*X*X - 7*X + 11) % 37 AS Y FROM system.numbers LIMIT 15) GROUP BY Y;
|
||||
SELECT Y, uniqThetaSketch(Z) FROM (SELECT number AS X, IPv4NumToString(toUInt32(X)) AS Z, (3*X*X - 7*X + 11) % 37 AS Y FROM system.numbers LIMIT 3000) GROUP BY Y;
|
||||
SELECT Y, uniqThetaSketch(Z) FROM (SELECT number AS X, IPv4NumToString(toUInt32(X)) AS Z, (3*X*X - 7*X + 11) % 37 AS Y FROM system.numbers LIMIT 1000000) GROUP BY Y;
|
||||
|
||||
SELECT 'uniqThetaSketch remote()';
|
||||
|
||||
SELECT uniqThetaSketch(dummy) FROM remote('127.0.0.{2,3}', system.one);
|
||||
|
||||
|
||||
SELECT 'uniqThetaSketch precise';
|
||||
SELECT uniqExact(number) FROM numbers(1e7);
|
||||
SELECT uniqCombined(number) FROM numbers(1e7);
|
||||
SELECT uniqCombined64(number) FROM numbers(1e7);
|
||||
SELECT uniqThetaSketch(number) FROM numbers(1e7);
|
||||
|
@ -228,5 +228,6 @@
|
||||
01790_dist_INSERT_block_structure_mismatch_types_and_names
|
||||
01791_dist_INSERT_block_structure_mismatch
|
||||
01798_uniq_theta_sketch
|
||||
01799_long_uniq_theta_sketch
|
||||
01801_distinct_group_by_shard
|
||||
01804_dictionary_decimal256_type
|
||||
|
Loading…
Reference in New Issue
Block a user