mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-22 09:40:49 +00:00
16 lines
1.0 KiB
Bash
16 lines
1.0 KiB
Bash
|
#!/usr/bin/env bash
|
||
|
|
||
|
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||
|
# shellcheck source=../shell_config.sh
|
||
|
. "$CURDIR"/../shell_config.sh
|
||
|
|
||
|
${CLICKHOUSE_CLIENT} --query "DROP TABLE IF EXISTS test_parameters";
|
||
|
${CLICKHOUSE_CLIENT} --param_database="test_db" --query "CREATE DATABASE {database:Identifier}";
|
||
|
${CLICKHOUSE_CLIENT} --query "CREATE TABLE test_db.test_parameters (id UInt64, col1 UInt64) ENGINE = MergeTree() ORDER BY id";
|
||
|
${CLICKHOUSE_CLIENT} --query "TRUNCATE TABLE test_db.test_parameters";
|
||
|
${CLICKHOUSE_CLIENT} --query "INSERT INTO test_db.test_parameters VALUES (0,0)";
|
||
|
${CLICKHOUSE_CLIENT} --param_table="test_parameters" --query "OPTIMIZE TABLE test_db.{table:Identifier}";
|
||
|
${CLICKHOUSE_CLIENT} --param_table="test_parameters" --query "ALTER TABLE test_db.{table:Identifier} RENAME COLUMN col1 to col2";
|
||
|
${CLICKHOUSE_CLIENT} --param_table="test_parameters" --query "EXISTS TABLE test_db.{table:Identifier}";
|
||
|
${CLICKHOUSE_CLIENT} --param_table="test_parameters" --query "DROP TABLE test_db.{table:Identifier}";
|