mirror of https://github.com/citusdata/citus.git
Reword error message for outer joins requiring repartition
We changed error message which appears when user tries to execute outer join command and that command requires repartitioning. Old error message mentioned about 1-to-1 shard partitioning which may not be clear to user.pull/1118/head
parent
5de4054443
commit
2e1df4c910
|
@ -244,9 +244,10 @@ FixedJoinOrderList(FromExpr *fromExpr, List *tableEntryList)
|
||||||
{
|
{
|
||||||
/* re-partitioning for OUTER joins is not implemented */
|
/* re-partitioning for OUTER joins is not implemented */
|
||||||
ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
|
ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
|
||||||
errmsg("cannot perform distributed planning on this query"),
|
errmsg("cannot run outer join query if join is not on the "
|
||||||
errdetail("Shards of relations in outer join queries must "
|
"partition column"),
|
||||||
"have 1-to-1 shard partitioning")));
|
errdetail("Outer joins requiring repartitioning are not "
|
||||||
|
"supported.")));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (joinType != JOIN_INNER)
|
if (joinType != JOIN_INNER)
|
||||||
|
|
|
@ -62,5 +62,5 @@ FROM (customer LEFT OUTER JOIN orders ON (c_custkey = o_custkey)) AS
|
||||||
test(c_custkey, c_nationkey)
|
test(c_custkey, c_nationkey)
|
||||||
INNER JOIN lineitem ON (test.c_custkey = l_orderkey)
|
INNER JOIN lineitem ON (test.c_custkey = l_orderkey)
|
||||||
LIMIT 10;
|
LIMIT 10;
|
||||||
ERROR: cannot perform distributed planning on this query
|
ERROR: cannot run outer join query if join is not on the partition column
|
||||||
DETAIL: Shards of relations in outer join queries must have 1-to-1 shard partitioning
|
DETAIL: Outer joins requiring repartitioning are not supported.
|
||||||
|
|
|
@ -245,8 +245,8 @@ SELECT
|
||||||
count(*)
|
count(*)
|
||||||
FROM
|
FROM
|
||||||
multi_outer_join_left a LEFT JOIN multi_outer_join_right b ON (l_nationkey = r_nationkey);
|
multi_outer_join_left a LEFT JOIN multi_outer_join_right b ON (l_nationkey = r_nationkey);
|
||||||
ERROR: cannot perform distributed planning on this query
|
ERROR: cannot run outer join query if join is not on the partition column
|
||||||
DETAIL: Shards of relations in outer join queries must have 1-to-1 shard partitioning
|
DETAIL: Outer joins requiring repartitioning are not supported.
|
||||||
-- Anti-join should return customers for which there is no row in the right table
|
-- Anti-join should return customers for which there is no row in the right table
|
||||||
SELECT
|
SELECT
|
||||||
min(l_custkey), max(l_custkey)
|
min(l_custkey), max(l_custkey)
|
||||||
|
|
|
@ -214,8 +214,8 @@ SELECT
|
||||||
min(r_custkey), max(r_custkey)
|
min(r_custkey), max(r_custkey)
|
||||||
FROM
|
FROM
|
||||||
multi_outer_join_left_hash a RIGHT JOIN multi_outer_join_right_reference b ON (l_custkey = r_custkey);
|
multi_outer_join_left_hash a RIGHT JOIN multi_outer_join_right_reference b ON (l_custkey = r_custkey);
|
||||||
ERROR: cannot perform distributed planning on this query
|
ERROR: cannot run outer join query if join is not on the partition column
|
||||||
DETAIL: Shards of relations in outer join queries must have 1-to-1 shard partitioning
|
DETAIL: Outer joins requiring repartitioning are not supported.
|
||||||
-- Reverse right join should be same as left join
|
-- Reverse right join should be same as left join
|
||||||
SELECT
|
SELECT
|
||||||
min(l_custkey), max(l_custkey)
|
min(l_custkey), max(l_custkey)
|
||||||
|
@ -278,8 +278,8 @@ SELECT
|
||||||
count(*)
|
count(*)
|
||||||
FROM
|
FROM
|
||||||
multi_outer_join_left_hash a LEFT JOIN multi_outer_join_right_hash b ON (l_nationkey = r_nationkey);
|
multi_outer_join_left_hash a LEFT JOIN multi_outer_join_right_hash b ON (l_nationkey = r_nationkey);
|
||||||
ERROR: cannot perform distributed planning on this query
|
ERROR: cannot run outer join query if join is not on the partition column
|
||||||
DETAIL: Shards of relations in outer join queries must have 1-to-1 shard partitioning
|
DETAIL: Outer joins requiring repartitioning are not supported.
|
||||||
-- Anti-join should return customers for which there is no row in the right table
|
-- Anti-join should return customers for which there is no row in the right table
|
||||||
SELECT
|
SELECT
|
||||||
min(l_custkey), max(l_custkey)
|
min(l_custkey), max(l_custkey)
|
||||||
|
@ -337,8 +337,8 @@ SELECT
|
||||||
min(r_custkey), max(r_custkey)
|
min(r_custkey), max(r_custkey)
|
||||||
FROM
|
FROM
|
||||||
multi_outer_join_left_hash a RIGHT JOIN multi_outer_join_right_reference b ON (l_custkey = r_custkey);
|
multi_outer_join_left_hash a RIGHT JOIN multi_outer_join_right_reference b ON (l_custkey = r_custkey);
|
||||||
ERROR: cannot perform distributed planning on this query
|
ERROR: cannot run outer join query if join is not on the partition column
|
||||||
DETAIL: Shards of relations in outer join queries must have 1-to-1 shard partitioning
|
DETAIL: Outer joins requiring repartitioning are not supported.
|
||||||
-- Reverse right join should be same as left join
|
-- Reverse right join should be same as left join
|
||||||
SELECT
|
SELECT
|
||||||
min(l_custkey), max(l_custkey)
|
min(l_custkey), max(l_custkey)
|
||||||
|
@ -601,8 +601,8 @@ SELECT
|
||||||
FROM
|
FROM
|
||||||
multi_outer_join_left_hash l1
|
multi_outer_join_left_hash l1
|
||||||
FULL JOIN multi_outer_join_third_reference t1 ON (l1.l_custkey = t1.t_custkey);
|
FULL JOIN multi_outer_join_third_reference t1 ON (l1.l_custkey = t1.t_custkey);
|
||||||
ERROR: cannot perform distributed planning on this query
|
ERROR: cannot run outer join query if join is not on the partition column
|
||||||
DETAIL: Shards of relations in outer join queries must have 1-to-1 shard partitioning
|
DETAIL: Outer joins requiring repartitioning are not supported.
|
||||||
-- inner join + single shard left join should work
|
-- inner join + single shard left join should work
|
||||||
SELECT
|
SELECT
|
||||||
l_custkey, r_custkey, t_custkey
|
l_custkey, r_custkey, t_custkey
|
||||||
|
@ -676,8 +676,8 @@ FROM
|
||||||
multi_outer_join_third_reference t1
|
multi_outer_join_third_reference t1
|
||||||
INNER JOIN multi_outer_join_left_hash l1 ON (l1.l_custkey = t1.t_custkey)
|
INNER JOIN multi_outer_join_left_hash l1 ON (l1.l_custkey = t1.t_custkey)
|
||||||
LEFT JOIN multi_outer_join_right_reference r1 ON (l1.l_custkey = r1.r_custkey);
|
LEFT JOIN multi_outer_join_right_reference r1 ON (l1.l_custkey = r1.r_custkey);
|
||||||
ERROR: cannot perform distributed planning on this query
|
ERROR: cannot run outer join query if join is not on the partition column
|
||||||
DETAIL: Shards of relations in outer join queries must have 1-to-1 shard partitioning
|
DETAIL: Outer joins requiring repartitioning are not supported.
|
||||||
-- inner (local) join + 2 shards left (dual partition) join should work
|
-- inner (local) join + 2 shards left (dual partition) join should work
|
||||||
SELECT
|
SELECT
|
||||||
l_custkey, t_custkey, r_custkey
|
l_custkey, t_custkey, r_custkey
|
||||||
|
|
Loading…
Reference in New Issue