Update 01818_input_format_with_names_use_header.sh

This commit is contained in:
Nikita Mikhaylov 2021-04-20 16:46:18 +03:00 committed by GitHub
parent 1ead618895
commit fc01b5b951
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,12 +4,12 @@ CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# shellcheck source=../shell_config.sh
. "$CUR_DIR"/../shell_config.sh
${CLICKHOUSE_CLIENT} -q "DROP TABLE IF EXISTS 01818_with_names;"
${CLICKHOUSE_CLIENT} -q "DROP TABLE IF EXISTS `01818_with_names`;"
${CLICKHOUSE_CLIENT} -q "CREATE TABLE 01818_with_names (t String) ENGINE = MergeTree ORDER BY t;"
${CLICKHOUSE_CLIENT} -q "CREATE TABLE `01818_with_names` (t String) ENGINE = MergeTree ORDER BY t;"
echo -ne "t\ntestdata1\ntestdata2" | ${CLICKHOUSE_CLIENT} --input_format_with_names_use_header 0 --query "INSERT INTO 01818_with_names FORMAT CSVWithNames"
echo -ne "t\ntestdata1\ntestdata2" | ${CLICKHOUSE_CLIENT} --input_format_with_names_use_header 0 --query "INSERT INTO `01818_with_names` FORMAT CSVWithNames"
${CLICKHOUSE_CLIENT} -q "SELECT * FROM 01818_with_names;"
${CLICKHOUSE_CLIENT} -q "SELECT * FROM `01818_with_names`;"
${CLICKHOUSE_CLIENT} -q "DROP TABLE IF EXISTS 01818_with_names;"
${CLICKHOUSE_CLIENT} -q "DROP TABLE IF EXISTS `01818_with_names`;"