This commit is contained in:
Nikita Mikhaylov 2021-08-27 13:12:19 +00:00
parent 1adbb2db18
commit 4a88e5f281
10 changed files with 60 additions and 33 deletions

View File

@ -15,5 +15,14 @@ chmod +x ./mc
./mc admin policy set clickminio readwrite user=test
./mc mb clickminio/test
echo -e "a b c\na b c\na b c\n" > a.txt
./mc cp a.txt clickminio/test
# Upload data to Minio. By default after unpacking all tests will in
# /usr/share/clickhouse-test/queries
cd /usr/share/clickhouse-test/queries/0_stateless/test_minio
FILES=$(ls .)
for FILE in $FILES; do
echo $FILE;
./mc cp $FILE myminio/test/$FILE;
done

View File

@ -0,0 +1,24 @@
0 0 0
0 0 0
0 0 0
1 2 3
4 5 6
7 8 9
10 11 12
13 14 15
16 17 18
20 21 22
23 24 25
26 27 28
0 0 0
0 0 0
0 0 0
1 2 3
4 5 6
7 8 9
10 11 12
13 14 15
16 17 18
20 21 22
23 24 25
26 27 28

View File

@ -1,21 +0,0 @@
#!/usr/bin/env bash
# NOTE: this is a partial copy of the 01683_dist_INSERT_block_structure_mismatch,
# but this test also checks the log messages
CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# shellcheck source=../shell_config.sh
. "$CUR_DIR"/../shell_config.sh
if [[ -z $S3_ACCESS_KEY_ID ]]; then
echo "@@SKIP@@: Missing \$S3_ACCESS_KEY_ID"
exit 0
fi
if [[ -z $S3_SECRET_ACCESS ]]; then
echo "@@SKIP@@: Missing \$S3_SECRET_ACCESS"
exit 0
fi
${CLICKHOUSE_CLIENT_BINARY} --send_logs_level="none" -q "SELECT * FROM s3('https://s3.mds.yandex.net/clickhouse-test-reports/*/*/functional_stateless_tests_(ubsan)/test_results.tsv', '$S3_ACCESS_KEY_ID', '$S3_SECRET_ACCESS', 'LineAsString', 'line String') limit 100 FORMAT Null;"
${CLICKHOUSE_CLIENT_BINARY} --send_logs_level="none" -q "SELECT * FROM s3Cluster('test_cluster_two_shards', 'https://s3.mds.yandex.net/clickhouse-test-reports/*/*/functional_stateless_tests_(ubsan)/test_results.tsv', '$S3_ACCESS_KEY_ID', '$S3_SECRET_ACCESS', 'LineAsString', 'line String') limit 100 FORMAT Null;"

View File

@ -0,0 +1,2 @@
select * from s3('http://localhost:11111/test/{a,b,c}.tsv', 'test', 'testtest', 'TSV', 'a UInt64, b UInt64, c UInt64') ORDER BY a, b, c;
select * from s3Cluster('test_cluster_two_shards', 'http://localhost:11111/test/{a,b,c}.tsv', 'test', 'testtest', 'TSV', 'a UInt64, b UInt64, c UInt64') ORDER BY a, b, c;

View File

@ -0,0 +1,3 @@
ClickHouse 1
Hello 2
Hedhehog 3

View File

@ -1,13 +1,7 @@
-- DROP TABLE IF EXISTS table_with_range;
DROP TABLE IF EXISTS table_with_range;
-- CREATE TABLE table_with_range
-- (
-- `name` String,
-- `value` UInt32
-- )
-- ENGINE = S3('https://storage.yandexcloud.net/my-test-bucket-768/{some,another}_prefix/some_file_{1..3}', 'CSV')
-- SETTINGS input_format_with_names_use_header = 0;
CREATE TABLE table_with_range(`name` String,`number` UInt32) ENGINE = S3('http://localhost:11111/test/tsv_with_header.tsv', 'lapa', 'lapalapa', 'TSVWithNames') SETTINGS input_format_with_names_use_header = 1;
select * from s3('http://localhost:11111/test/a.txt', 'test', 'testtest', 'LineAsString', 'line String');
select * from table_with_range;
-- DROP TABLE IF EXISTS table_with_range;
DROP TABLE IF EXISTS table_with_range;

View File

@ -0,0 +1,4 @@
1 2 3
4 5 6
7 8 9
0 0 0
1 1 2 3
2 4 5 6
3 7 8 9
4 0 0 0

View File

@ -0,0 +1,4 @@
10 11 12
13 14 15
16 17 18
0 0 0
1 10 11 12
2 13 14 15
3 16 17 18
4 0 0 0

View File

@ -0,0 +1,4 @@
20 21 22
23 24 25
26 27 28
0 0 0
1 20 21 22
2 23 24 25
3 26 27 28
4 0 0 0

View File

@ -0,0 +1,4 @@
number name
1 ClickHouse
2 Hello
3 Hedhehog
1 number name
2 1 ClickHouse
3 2 Hello
4 3 Hedhehog