Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disable parallel replicas JOIN with CTE (not analyzer)
- Loading branch information
1 parent
10d4f1f
commit 176d8be
Showing
7 changed files
with
84 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
tests/queries/0_stateless/02972_parallel_replicas_cte.reference
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
990000 | ||
990000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
DROP TABLE IF EXISTS pr_1; | ||
DROP TABLE IF EXISTS pr_2; | ||
|
||
CREATE TABLE pr_1 (`a` UInt32) ENGINE = MergeTree ORDER BY a PARTITION BY a % 10 AS | ||
SELECT 10 * intDiv(number, 10) + 1 FROM numbers(1_000_000); | ||
|
||
CREATE TABLE pr_2 (`a` UInt32) ENGINE = MergeTree ORDER BY a AS | ||
SELECT * FROM numbers(1_000_000); | ||
|
||
WITH filtered_groups AS (SELECT a FROM pr_1 WHERE a >= 10000) | ||
SELECT count() FROM pr_2 INNER JOIN filtered_groups ON pr_2.a = filtered_groups.a; | ||
|
||
WITH filtered_groups AS (SELECT a FROM pr_1 WHERE a >= 10000) | ||
SELECT count() FROM pr_2 INNER JOIN filtered_groups ON pr_2.a = filtered_groups.a | ||
SETTINGS allow_experimental_parallel_reading_from_replicas = 1, parallel_replicas_for_non_replicated_merge_tree = 1, cluster_for_parallel_replicas = 'test_cluster_two_shards', max_parallel_replicas = 3; | ||
|
||
-- Testing that it is disabled for allow_experimental_analyzer=0. With analyzer it will be supported (with correct result) | ||
WITH filtered_groups AS (SELECT a FROM pr_1 WHERE a >= 10000) | ||
SELECT count() FROM pr_2 INNER JOIN filtered_groups ON pr_2.a = filtered_groups.a | ||
SETTINGS allow_experimental_analyzer = 0, allow_experimental_parallel_reading_from_replicas = 2, parallel_replicas_for_non_replicated_merge_tree = 1, cluster_for_parallel_replicas = 'test_cluster_two_shards', max_parallel_replicas = 3; -- { serverError SUPPORT_IS_DISABLED } | ||
|
||
DROP TABLE IF EXISTS pr_1; | ||
DROP TABLE IF EXISTS pr_2; |