mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Add more tests. [#CLICKHOUSE-3084]
This commit is contained in:
parent
fefb4dad67
commit
1c574af576
@ -17,3 +17,71 @@
|
||||
2000000 1000001000000 1000000
|
||||
2000000 1000001000000 1000000
|
||||
2000000 1000001000000 1000000 1000001000000
|
||||
|
||||
512 1 512 512
|
||||
1024 1 1024 1024
|
||||
2048 1 1024 2048
|
||||
4096 1 1024 4096
|
||||
8192 1 1024 8192
|
||||
16384 1 1024 16384
|
||||
32768 1 1024 32768
|
||||
65536 1 1024 65536
|
||||
131072 1 1024 65536
|
||||
262144 1 1024 65536
|
||||
524288 1 1024 65536
|
||||
512 1 512 512
|
||||
1024 1 1024 1024
|
||||
2048 1 1024 2048
|
||||
4096 1 1024 4096
|
||||
8192 1 1024 8192
|
||||
16384 1 1024 16384
|
||||
32768 1 1024 32768
|
||||
65536 1 1024 65536
|
||||
131072 1 1024 65536
|
||||
262144 1 1024 65536
|
||||
524288 1 1024 65536
|
||||
512 1 512 512
|
||||
1024 1 1024 1024
|
||||
2048 1 1024 2048
|
||||
4096 1 1024 4096
|
||||
8192 1 1024 8192
|
||||
16384 1 1024 16384
|
||||
32768 1 1024 32768
|
||||
65536 1 1024 65536
|
||||
131072 1 1024 65536
|
||||
262144 1 1024 65536
|
||||
524288 1 1024 65536
|
||||
|
||||
512 1 1024 1024
|
||||
1024 1 1500 2048
|
||||
2048 1 1500 4096
|
||||
4096 1 1500 8192
|
||||
8192 1 1500 16384
|
||||
16384 1 1500 32768
|
||||
32768 1 1500 65536
|
||||
65536 1 1500 70000
|
||||
131072 1 1500 70000
|
||||
262144 1 1500 70000
|
||||
524288 1 1500 70000
|
||||
512 1 1024 1024
|
||||
1024 1 1500 2048
|
||||
2048 1 1500 4096
|
||||
4096 1 1500 8192
|
||||
8192 1 1500 16384
|
||||
16384 1 1500 32768
|
||||
32768 1 1500 65536
|
||||
65536 1 1500 70000
|
||||
131072 1 1500 70000
|
||||
262144 1 1500 70000
|
||||
524288 1 1500 70000
|
||||
512 1 1024 1024
|
||||
1024 1 1500 2048
|
||||
2048 1 1500 4096
|
||||
4096 1 1500 8192
|
||||
8192 1 1500 16384
|
||||
16384 1 1500 32768
|
||||
32768 1 1500 65536
|
||||
65536 1 1500 70000
|
||||
131072 1 1500 70000
|
||||
262144 1 1500 70000
|
||||
524288 1 1500 70000
|
||||
|
@ -14,5 +14,20 @@ SELECT count(), sum(toUInt64(ns)), max(toUInt64(ns)) FROM (SELECT intDiv(number,
|
||||
SELECT count(), sum(toUInt64(ns[1])), max(toUInt64(ns[1])), sum(toUInt64(ns[2]))/10 FROM (SELECT intDiv(number, 100) AS k, groupArray([toString(number), toString(number*10)]) AS ns FROM remote('127.0.0.{1,2}', 'test', 'numbers_mt') GROUP BY k) ARRAY JOIN ns;
|
||||
|
||||
DROP TABLE test.numbers_mt;
|
||||
CREATE TABLE test.numbers_mt (number UInt64) ENGINE = Log;
|
||||
INSERT INTO test.numbers_mt SELECT * FROM system.numbers LIMIT 1, 1048575;
|
||||
|
||||
-- clickhouse-local -q "SELECT arrayReduce('groupArrayState', [['1'], ['22'], ['333']]) FORMAT RowBinary" | clickhouse-local --input-format RowBinary --structure "d AggregateFunction(groupArray2, Array(String))" -q "SELECT groupArray2Merge(d) FROM table"
|
||||
SELECT '';
|
||||
SELECT roundToExp2(number) AS k, length(groupArray(1)(number AS i)), length(groupArray(1024)(i)), length(groupArray(65536)(i)) AS s FROM test.numbers_mt GROUP BY k ORDER BY k LIMIT 9, 11;
|
||||
SELECT roundToExp2(number) AS k, length(groupArray(1)(hex(number) AS i)), length(groupArray(1024)(i)), length(groupArray(65536)(i)) AS s FROM test.numbers_mt GROUP BY k ORDER BY k LIMIT 9, 11;
|
||||
SELECT roundToExp2(number) AS k, length(groupArray(1)([hex(number)] AS i)), length(groupArray(1024)(i)), length(groupArray(65536)(i)) AS s FROM test.numbers_mt GROUP BY k ORDER BY k LIMIT 9, 11;
|
||||
|
||||
SELECT '';
|
||||
SELECT roundToExp2(number) AS k, length(groupArray(1)(number AS i)), length(groupArray(1500)(i)), length(groupArray(70000)(i)) AS s FROM remote('127.0.0.{1,2}', 'test', 'numbers_mt') GROUP BY k ORDER BY k LIMIT 9, 11;
|
||||
SELECT roundToExp2(number) AS k, length(groupArray(1)(hex(number) AS i)), length(groupArray(1500)(i)), length(groupArray(70000)(i)) AS s FROM remote('127.0.0.{1,2}', 'test', 'numbers_mt') GROUP BY k ORDER BY k LIMIT 9, 11;
|
||||
SELECT roundToExp2(number) AS k, length(groupArray(1)([hex(number)] AS i)), length(groupArray(1500)(i)), length(groupArray(70000)(i)) AS s FROM remote('127.0.0.{1,2}', 'test', 'numbers_mt') GROUP BY k ORDER BY k LIMIT 9, 11;
|
||||
|
||||
DROP TABLE test.numbers_mt;
|
||||
|
||||
-- Check binary compability:
|
||||
-- clickhouse-client -h old -q "SELECT arrayReduce('groupArrayState', [['1'], ['22'], ['333']]) FORMAT RowBinary" | clickhouse-local --input-format RowBinary --structure "d AggregateFunction(groupArray2, Array(String))" -q "SELECT groupArray2Merge(d) FROM table"
|
||||
|
Loading…
Reference in New Issue
Block a user