-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Duplicates on JOIN + CROSS JOIN. Parallel Replicas #74337
Copy link
Copy link
Closed
Labels
bugConfirmed user-visible misbehaviour in official releaseConfirmed user-visible misbehaviour in official releasecomp-parallel-replicasParallel reading from replicas for query speed (not data replication consistency).Parallel reading from replicas for query speed (not data replication consistency).
Description
Repro on cluster with parallel replicas enabled:
SET enable_analyzer = 1;
DROP TABLE IF EXISTS v1;
DROP TABLE IF EXISTS v2;
CREATE TABLE v1 ( id Int32 ) ENGINE = MergeTree() ORDER BY id;
CREATE TABLE v2 ( value Int32 ) ENGINE = MergeTree() ORDER BY value;
INSERT INTO v1 ( id ) VALUES (1);
INSERT INTO v2 ( value ) VALUES (1);
SELECT * FROM v1 AS t1
JOIN v1 AS t2 USING (id)
CROSS JOIN v2 AS n1;
Result:
-- set enable_parallel_replicas=1;
1 1
1 1
1 1
-- Expect:
-- set enable_parallel_replicas=0;
1 1
Double cross join
SELECT * FROM v1 AS t1
JOIN v1 AS t2 USING (id)
CROSS JOIN v2 AS n1
CROSS JOIN v2 AS n2;
-- set enable_parallel_replicas=1;
1 1 1
1 1 1
1 1 1
-- Expect:
-- set enable_parallel_replicas=0;
1 1 1
Affected tests:
01852_multiple_joins_with_union_join
Version: 25.1.1.1921
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugConfirmed user-visible misbehaviour in official releaseConfirmed user-visible misbehaviour in official releasecomp-parallel-replicasParallel reading from replicas for query speed (not data replication consistency).Parallel reading from replicas for query speed (not data replication consistency).