dbms: added tests for UnionBlockInputStream [#METR-2944].

This commit is contained in:
Alexey Milovidov 2014-11-30 15:01:46 +03:00
parent bd107656dc
commit 0abde09572
11 changed files with 32 additions and 0 deletions

View File

@ -0,0 +1 @@
..........

View File

@ -0,0 +1,12 @@
#!/bin/bash -e
echo "
DROP TABLE IF EXISTS test.two_blocks;
CREATE TABLE test.two_blocks (d Date) ENGINE = MergeTree(d, d, 1);
INSERT INTO test.two_blocks VALUES ('2000-01-01');
INSERT INTO test.two_blocks VALUES ('2000-01-02');
" | clickhouse-client -n
for i in {1..10}; do seq 1 100 | sed 's/.*/SELECT count() FROM (SELECT * FROM test.two_blocks);/' | clickhouse-client -n --receive_timeout=1 | grep -vE '^2$' && echo 'Fail!' && break; echo -n '.'; done; echo
echo "DROP TABLE test.two_blocks;" | clickhouse-client -n

View File

@ -0,0 +1 @@
..........

View File

@ -0,0 +1,3 @@
#!/bin/bash -e
for i in {1..10}; do seq 1 100 | sed 's/.*/SELECT count() FROM (SELECT * FROM (SELECT * FROM system.numbers_mt LIMIT 111) LIMIT 55);/' | clickhouse-client -n --receive_timeout=1 --max_block_size=1 | grep -vE '^55$' && echo 'Fail!' && break; echo -n '.'; done; echo

View File

@ -0,0 +1 @@
..........

View File

@ -0,0 +1,3 @@
#!/bin/bash -e
for i in {1..10}; do seq 1 100 | sed 's/.*/SELECT * FROM (SELECT * FROM system.numbers_mt LIMIT 111) LIMIT 55;/' | clickhouse-client -n --receive_timeout=1 --max_block_size=1 | wc -l | grep -vE '^5500$' && echo 'Fail!' && break; echo -n '.'; done; echo

View File

@ -0,0 +1 @@
..........

View File

@ -0,0 +1,3 @@
#!/bin/bash -e
for i in {1..10}; do seq 1 10 | sed 's/.*/SELECT 1 % ((number + 500) % 1000) FROM system.numbers_mt LIMIT 1000;/' | clickhouse-client -n --receive_timeout=1 --max_block_size=1 >/dev/null 2>&1 && echo 'Fail!' && break; echo -n '.'; done; echo

View File

@ -0,0 +1 @@
..........

View File

@ -0,0 +1,3 @@
#!/bin/bash -e
for i in {1..10}; do seq 1 100 | sed 's/.*/SELECT * FROM system.numbers_mt LIMIT 111;/' | clickhouse-client -n --receive_timeout=1 --max_block_size=$(($RANDOM % 123 + 1)) | wc -l | grep -vE '^11100$' && echo 'Fail!' && break; echo -n '.'; done; echo

View File

@ -0,0 +1,3 @@
#!/bin/bash -e
for i in {1..10}; do sleep 0.0$RANDOM; seq 1 100 | sed 's/.*/SELECT 1 % (number - 10000000) FROM system.numbers_mt;/' | clickhouse-client -n --receive_timeout=1 --max_block_size=10 >/dev/null 2>&1 && echo 'Fail!' && break; echo -n '.'; done; echo