ClickHouse/tests/queries/0_stateless/02541_lightweight_delete_on_cluster.sql

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
681 B
MySQL
Raw Normal View History

2023-01-30 17:37:45 +00:00
-- Tags: distributed, no-replicated-database
2023-01-30 15:40:45 +00:00
-- Tag no-replicated-database: ON CLUSTER is not allowed
2023-01-30 16:57:19 +00:00
SET distributed_ddl_output_mode='throw';
2023-01-30 15:40:45 +00:00
CREATE TABLE t1_local ON CLUSTER test_shard_localhost(partition_col_1 String, tc1 int,tc2 int) ENGINE=MergeTree() PARTITION BY partition_col_1 ORDER BY tc1;
INSERT INTO t1_local VALUES('partition1', 1,1);
INSERT INTO t1_local VALUES('partition2', 1,2);
INSERT INTO t1_local VALUES('partition1', 2,3);
INSERT INTO t1_local VALUES('partition2', 2,4);
-- { echoOn }
SELECT * FROM t1_local ORDER BY tc1, tc2;
DELETE FROM t1_local ON CLUSTER test_shard_localhost WHERE tc1 = 1;
SELECT * FROM t1_local ORDER BY tc1, tc2;
-- { echoOff }