Add missing tests

This commit is contained in:
Amos Bird 2019-10-29 22:26:43 +08:00
parent 2c75a51d4f
commit 1eb44c6837
No known key found for this signature in database
GPG Key ID: 80D430DCBECFEDB4
4 changed files with 43 additions and 0 deletions

View File

@ -0,0 +1,14 @@
1234567
2469134
2469134
1234567
1234567
1234567
1234567
1234567
1234567
1234567
1234567
1234568
1234567

View File

@ -0,0 +1,18 @@
DROP TABLE IF EXISTS test.count;
CREATE TABLE test.count (x UInt64) ENGINE = MergeTree ORDER BY tuple();
INSERT INTO test.count SELECT * FROM numbers(1234567);
SELECT count() FROM test.count;
SELECT count() * 2 FROM test.count;
SELECT count() FROM (SELECT * FROM test.count UNION ALL SELECT * FROM test.count);
SELECT count() FROM test.count WITH TOTALS;
SELECT arrayJoin([count(), count()]) FROM test.count;
SELECT arrayJoin([count(), count()]) FROM test.count LIMIT 1;
SELECT arrayJoin([count(), count()]) FROM test.count LIMIT 1, 1;
SELECT arrayJoin([count(), count()]) AS x FROM test.count LIMIT 1 BY x;
SELECT arrayJoin([count(), count() + 1]) AS x FROM test.count LIMIT 1 BY x;
SELECT count() FROM test.count HAVING count() = 1234567;
SELECT count() FROM test.count HAVING count() != 1234567;
DROP TABLE test.count;

View File

@ -0,0 +1,2 @@
2469134
1234567

View File

@ -0,0 +1,9 @@
DROP TABLE IF EXISTS test.count;
CREATE TABLE test.count (x UInt64) ENGINE = MergeTree ORDER BY tuple();
INSERT INTO test.count SELECT * FROM numbers(1234567);
SELECT count() FROM remote('127.0.0.{1,2}', test.count);
SELECT count() / 2 FROM remote('127.0.0.{1,2}', test.count);
DROP TABLE test.count;