mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 01:51:59 +00:00
Fix broken test
This commit is contained in:
parent
06652b7d1f
commit
10ea709931
29
tests/queries/0_stateless/02513_insert_without_materialized_columns.sh
Executable file
29
tests/queries/0_stateless/02513_insert_without_materialized_columns.sh
Executable file
@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env bash
|
||||
# Tags: no-parallel
|
||||
|
||||
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||
# shellcheck source=../shell_config.sh
|
||||
. "$CURDIR"/../shell_config.sh
|
||||
|
||||
|
||||
FILE_NAME="${CLICKHOUSE_DATABASE}_test.native.zstd"
|
||||
|
||||
${CLICKHOUSE_CLIENT} --query "DROP TABLE IF EXISTS test"
|
||||
|
||||
${CLICKHOUSE_CLIENT} --query "CREATE TABLE test (a Int64, b Int64 MATERIALIZED a) ENGINE = MergeTree() PRIMARY KEY tuple()"
|
||||
|
||||
${CLICKHOUSE_CLIENT} --query "INSERT INTO test VALUES (1)"
|
||||
|
||||
${CLICKHOUSE_CLIENT} --query "SELECT * FROM test"
|
||||
|
||||
${CLICKHOUSE_CLIENT} --query "SELECT * FROM test INTO OUTFILE '${CLICKHOUSE_TMP}/${FILE_NAME}' FORMAT Native"
|
||||
|
||||
${CLICKHOUSE_CLIENT} --query "TRUNCATE TABLE test"
|
||||
|
||||
${CLICKHOUSE_CLIENT} --query "INSERT INTO test FROM INFILE '${CLICKHOUSE_TMP}/${FILE_NAME}'"
|
||||
|
||||
${CLICKHOUSE_CLIENT} --query "SELECT * FROM test"
|
||||
|
||||
${CLICKHOUSE_CLIENT} --query "DROP TABLE test"
|
||||
|
||||
rm -f "${CLICKHOUSE_TMP}/${FILE_NAME}"
|
@ -1,20 +0,0 @@
|
||||
-- Tags: no-parallel
|
||||
|
||||
DROP TABLE IF EXISTS test;
|
||||
create table test (
|
||||
a Int64,
|
||||
b Int64 materialized a
|
||||
)
|
||||
engine = MergeTree()
|
||||
primary key tuple();
|
||||
|
||||
insert into test values (1);
|
||||
SELECT * FROM test;
|
||||
|
||||
select * from test into outfile 'test.native.zstd' format Native;
|
||||
truncate table test;
|
||||
insert into test from infile 'test.native.zstd';
|
||||
|
||||
SELECT * FROM test;
|
||||
|
||||
DROP TABLE test;
|
Loading…
Reference in New Issue
Block a user