mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 08:02:02 +00:00
Merge pull request #125 from ludv1x/test-refine
Small refinement of recently added tests.
This commit is contained in:
commit
00ded53f42
@ -1,4 +1,5 @@
|
||||
clickhouse-client -n --query "DROP TABLE IF EXISTS test.json_noisy; CREATE TABLE test.json_noisy (d1 UInt8, d2 String) ENGINE = Memory"
|
||||
#!/bin/bash
|
||||
clickhouse-client -n --query "DROP TABLE IF EXISTS test.json_noisy; CREATE TABLE test.json_noisy (d1 UInt8, d2 String) ENGINE = Memory"
|
||||
|
||||
echo '{"d1" : 1, "d2" : "ok"}
|
||||
{ }
|
||||
@ -7,4 +8,4 @@ echo '{"d1" : 1, "d2" : "ok"}
|
||||
{"d2":"ok","t1":[[[]],true, null, false, "1","2", 0.03, 1], "d1":"1", "t2":["1","2"]}' \
|
||||
| clickhouse-client -n --query "SET input_format_skip_unknown_fields = 1; INSERT INTO test.json_noisy FORMAT JSONEachRow"
|
||||
|
||||
clickhouse-client -n --query "SELECT * FROM test.json_noisy; DROP TABLE IF EXISTS test.json_noisy;"
|
||||
clickhouse-client -n --query "SELECT * FROM test.json_noisy; DROP TABLE IF EXISTS test.json_noisy;"
|
||||
|
@ -4,8 +4,7 @@ CREATE TABLE test.group_uniq_str ENGINE = Memory AS SELECT number % 10 as id, to
|
||||
INSERT INTO test.group_uniq_str SELECT 2 as id, toString(number % 100) as v FROM system.numbers LIMIT 1000000;
|
||||
INSERT INTO test.group_uniq_str SELECT 5 as id, toString(number % 100) as v FROM system.numbers LIMIT 10000000;
|
||||
|
||||
SELECT length(groupUniqArray(v)) FROM test.group_uniq_str GROUP BY id ORDER BY id
|
||||
UNION ALL
|
||||
SELECT length(groupUniqArray(v)) FROM test.group_uniq_str GROUP BY id ORDER BY id;
|
||||
SELECT length(groupUniqArray(v)) FROM remote('127.0.0.{1,2,3,4}', 'test', 'group_uniq_str') GROUP BY id ORDER BY id;
|
||||
|
||||
DROP TABLE IF EXISTS test.group_uniq_str;
|
||||
|
@ -3,8 +3,7 @@ CREATE TABLE test.group_uniq_arr_int ENGINE = Memory AS
|
||||
SELECT g as id, if(c == 0, [v], if(c == 1, emptyArrayInt64(), [v, v])) as v FROM
|
||||
(SELECT intDiv(number%1000000, 100) as v, intDiv(number%100, 10) as g, number%10 as c FROM system.numbers WHERE c < 3 LIMIT 10000000);
|
||||
|
||||
SELECT length(groupUniqArray(v)) FROM test.group_uniq_arr_int GROUP BY id ORDER BY id
|
||||
UNION ALL
|
||||
SELECT length(groupUniqArray(v)) FROM test.group_uniq_arr_int GROUP BY id ORDER BY id;
|
||||
SELECT length(groupUniqArray(v)) FROM remote('127.0.0.{1,2,3,4}', 'test', 'group_uniq_arr_int') GROUP BY id ORDER BY id;
|
||||
|
||||
DROP TABLE IF EXISTS test.group_uniq_arr_int;
|
||||
|
@ -3,8 +3,7 @@ CREATE TABLE test.group_uniq_arr_str ENGINE = Memory AS
|
||||
SELECT hex(intHash32(g)) as id, if(c == 0, [hex(v)], if(c == 1, emptyArrayString(), [hex(v), hex(v)])) as v FROM
|
||||
(SELECT intDiv(number%1000000, 100) as v, intDiv(number%100, 10) as g, number%10 as c FROM system.numbers WHERE c < 3 LIMIT 10000000);
|
||||
|
||||
SELECT length(groupUniqArray(v)) FROM test.group_uniq_arr_str GROUP BY id ORDER BY id
|
||||
UNION ALL
|
||||
SELECT length(groupUniqArray(v)) FROM test.group_uniq_arr_str GROUP BY id ORDER BY id;
|
||||
SELECT length(groupUniqArray(v)) FROM remote('127.0.0.{1,2,3,4}', 'test', 'group_uniq_arr_str') GROUP BY id ORDER BY id;
|
||||
|
||||
DROP TABLE IF EXISTS test.group_uniq_arr_str;
|
||||
|
Loading…
Reference in New Issue
Block a user