ClickHouse/tests/queries/0_stateless/03231_pr_duplicate_announcement.sql

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

24 lines
871 B
MySQL
Raw Normal View History

2024-09-02 12:37:53 +00:00
DROP TABLE IF EXISTS test_table SYNC;
2024-09-02 11:06:24 +00:00
CREATE TABLE test_table
(
id UInt64,
value String
) ENGINE=ReplicatedMergeTree('/clickhouse/test/{database}/test_table', 'r1') ORDER BY tuple();
INSERT INTO test_table VALUES (0, 'Value_0'), (1, 'Value_1'), (2, 'Value_2');
2024-09-02 12:37:53 +00:00
DROP TABLE IF EXISTS test_table_for_in SYNC;
2024-09-02 11:06:24 +00:00
CREATE TABLE test_table_for_in
(
id UInt64
) ENGINE=ReplicatedMergeTree('/clickhouse/test/{database}/test_table_for_in', 'r1') ORDER BY tuple();
INSERT INTO test_table_for_in VALUES (0), (1);
2024-09-02 12:37:53 +00:00
SET allow_experimental_parallel_reading_from_replicas=1, max_parallel_replicas=3, cluster_for_parallel_replicas='test_cluster_one_shard_three_replicas_localhost';
2024-09-02 11:06:24 +00:00
SELECT id, value FROM test_table WHERE id IN (SELECT id FROM test_table_for_in UNION DISTINCT SELECT id FROM test_table_for_in);
2024-09-02 12:37:53 +00:00
DROP TABLE test_table SYNC;
DROP TABLE test_table_for_in SYNC;