ClickHouse/tests/queries/0_stateless/01059_storage_file_compression.sh

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

26 lines
1.1 KiB
Bash
Raw Normal View History

2021-08-23 17:12:24 +00:00
#!/usr/bin/env bash
2021-09-12 12:35:27 +00:00
# Tags: no-fasttest
# Tag no-fasttest: depends on brotli and bzip2
2021-08-23 17:12:24 +00:00
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# shellcheck source=../shell_config.sh
. "$CURDIR"/../shell_config.sh
2022-03-17 12:28:43 +00:00
for m in gz br xz zst lz4 bz2
2021-08-23 17:12:24 +00:00
do
${CLICKHOUSE_CLIENT} --query "DROP TABLE IF EXISTS file"
2021-08-23 23:01:14 +00:00
${CLICKHOUSE_CLIENT} --query "CREATE TABLE file (x UInt64) ENGINE = File(TSV, '${CLICKHOUSE_DATABASE}/${m}.tsv.${m}')"
${CLICKHOUSE_CLIENT} --query "TRUNCATE TABLE file"
2021-08-23 17:12:24 +00:00
${CLICKHOUSE_CLIENT} --query "INSERT INTO file SELECT * FROM numbers(1000000)"
${CLICKHOUSE_CLIENT} --query "SELECT count(), max(x) FROM file"
${CLICKHOUSE_CLIENT} --query "DROP TABLE file"
done
2022-03-17 12:28:43 +00:00
2022-03-24 20:29:12 +00:00
${CLICKHOUSE_CLIENT} --max_read_buffer_size=1048576 --query "SELECT count(), max(x) FROM file('${CLICKHOUSE_DATABASE}/{gz,br,xz,zst,lz4,bz2}.tsv.{gz,br,xz,zst,lz4,bz2}', TSV, 'x UInt64')"
2022-03-17 12:28:43 +00:00
for m in gz br xz zst lz4 bz2
do
2022-03-24 20:29:12 +00:00
${CLICKHOUSE_CLIENT} --max_read_buffer_size=1048576 --query "SELECT count() < 4000000, max(x) FROM file('${CLICKHOUSE_DATABASE}/${m}.tsv.${m}', RowBinary, 'x UInt8', 'none')"
2022-03-17 12:28:43 +00:00
done