ClickHouse/tests/queries/1_stateful/00161_parallel_parsing_with_names.sh

33 lines
1.8 KiB
Bash
Raw Normal View History

2021-02-24 17:04:37 +00:00
#!/usr/bin/env bash
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# shellcheck source=../shell_config.sh
. "$CURDIR"/../shell_config.sh
FORMATS=('TSVWithNames' 'CSVWithNames')
$CLICKHOUSE_CLIENT -q "DROP TABLE IF EXISTS parsing_with_names"
for format in "${FORMATS[@]}"
do
2021-03-01 19:58:55 +00:00
# Columns are permuted
2022-03-11 23:31:20 +00:00
$CLICKHOUSE_CLIENT -q "CREATE TABLE parsing_with_names(c FixedString(16), a DateTime('Asia/Dubai'), b String) ENGINE=Memory()"
2021-07-18 09:16:35 +00:00
2021-02-24 17:04:37 +00:00
echo "$format, false";
2022-04-11 12:56:32 +00:00
$CLICKHOUSE_CLIENT --max_threads=0 --max_block_size=65505 --output_format_parallel_formatting=false -q \
2022-03-11 23:31:20 +00:00
"SELECT URLRegions as d, toTimeZone(ClientEventTime, 'Asia/Dubai') as a, MobilePhoneModel as b, ParamPrice as e, ClientIP6 as c FROM test.hits LIMIT 50000 Format $format" | \
$CLICKHOUSE_CLIENT --max_threads=0 --max_block_size=65505 --input_format_skip_unknown_fields=1 --input_format_parallel_parsing=false -q "INSERT INTO parsing_with_names FORMAT $format"
2021-02-24 17:04:37 +00:00
2021-03-11 15:21:58 +00:00
$CLICKHOUSE_CLIENT -q "SELECT * FROM parsing_with_names;" | md5sum
2021-02-24 17:04:37 +00:00
$CLICKHOUSE_CLIENT -q "DROP TABLE IF EXISTS parsing_with_names"
2021-07-18 09:16:35 +00:00
2022-03-11 23:31:20 +00:00
$CLICKHOUSE_CLIENT -q "CREATE TABLE parsing_with_names(c FixedString(16), a DateTime('Asia/Dubai'), b String) ENGINE=Memory()"
2021-02-24 17:04:37 +00:00
echo "$format, true";
$CLICKHOUSE_CLIENT --max_threads=0 --max_block_size=65505 --output_format_parallel_formatting=false -q \
2022-03-11 23:31:20 +00:00
"SELECT URLRegions as d, toTimeZone(ClientEventTime, 'Asia/Dubai') as a, MobilePhoneModel as b, ParamPrice as e, ClientIP6 as c FROM test.hits LIMIT 50000 Format $format" | \
$CLICKHOUSE_CLIENT --max_threads=0 --max_block_size=65505 --input_format_skip_unknown_fields=1 --input_format_parallel_parsing=true -q "INSERT INTO parsing_with_names FORMAT $format"
2021-02-24 17:04:37 +00:00
2021-03-11 15:21:58 +00:00
$CLICKHOUSE_CLIENT -q "SELECT * FROM parsing_with_names;" | md5sum
2021-02-24 17:04:37 +00:00
$CLICKHOUSE_CLIENT -q "DROP TABLE IF EXISTS parsing_with_names"
2021-07-18 09:16:35 +00:00
done