diff --git a/tests/queries/0_stateless/01901_test_attach_partition_from.sql b/tests/queries/0_stateless/01901_test_attach_partition_from.sql index f04b3f63b7f..0ffa4cdecf2 100644 --- a/tests/queries/0_stateless/01901_test_attach_partition_from.sql +++ b/tests/queries/0_stateless/01901_test_attach_partition_from.sql @@ -1,24 +1,23 @@ DROP TABLE IF EXISTS test_alter_attach_01901S; DROP TABLE IF EXISTS test_alter_attach_01901D; -CREATE TABLE test_alter_attach_01901S (A Int64, D date) ENGINE = MergeTree partition by D order by A; -insert into test_alter_attach_01901S values(1, '2020-01-01'); +CREATE TABLE test_alter_attach_01901S (A Int64, D date) ENGINE = MergeTree PARTITION BY D ORDER BY A; +INSERT INTO test_alter_attach_01901S VALUES (1, '2020-01-01'); -create table test_alter_attach_01901D (A Int64, D date) +CREATE TABLE test_alter_attach_01901D (A Int64, D date) Engine=ReplicatedMergeTree('/clickhouse/tables/test_alter_attach_01901D', 'r1') -partition by D order by A; +PARTITION BY D ORDER BY A; -alter table test_alter_attach_01901D attach partition '2020-01-01' from test_alter_attach_01901S; +ALTER TABLE test_alter_attach_01901D ATTACH PARTITION '2020-01-01' FROM test_alter_attach_01901S; -select count() from test_alter_attach_01901D; -select count() from test_alter_attach_01901S; +SELECT count() FROM test_alter_attach_01901D; +SELECT count() FROM test_alter_attach_01901S; -insert into test_alter_attach_01901S values(1, '2020-01-01'); -alter table test_alter_attach_01901D replace partition '2020-01-01' from test_alter_attach_01901S; +INSERT INTO test_alter_attach_01901S VALUES (1, '2020-01-01'); +ALTER TABLE test_alter_attach_01901D REPLACE PARTITION '2020-01-01' FROM test_alter_attach_01901S; -select count() from test_alter_attach_01901D; -select count() from test_alter_attach_01901S; +SELECT count() FROM test_alter_attach_01901D; +SELECT count() FROM test_alter_attach_01901S; DROP TABLE test_alter_attach_01901S; DROP TABLE test_alter_attach_01901D; -