diff --git a/src/backend/distributed/planner/multi_join_order.c b/src/backend/distributed/planner/multi_join_order.c index 5c08b7b24..cdfd94cc5 100644 --- a/src/backend/distributed/planner/multi_join_order.c +++ b/src/backend/distributed/planner/multi_join_order.c @@ -1020,7 +1020,7 @@ SinglePartitionJoin(JoinOrderNode *currentJoinNode, TableEntry *candidateTable, currentPartitionMethod, currentAnchorTable); } - else + else if (candidatePartitionMethod == DISTRIBUTE_BY_RANGE) { return MakeJoinOrderNode(candidateTable, SINGLE_RANGE_PARTITION_JOIN, currentPartitionColumnList, diff --git a/src/test/regress/expected/non_colocated_join_order.out b/src/test/regress/expected/non_colocated_join_order.out index e8e95f8be..bf3ca55ae 100644 --- a/src/test/regress/expected/non_colocated_join_order.out +++ b/src/test/regress/expected/non_colocated_join_order.out @@ -41,7 +41,7 @@ SET citus.shard_replication_factor to 1; -- for interval [8,10] repartition join logic will be triggered. SET citus.enable_repartition_joins to ON; SELECT count(*) FROM test_table_1, test_table_2 WHERE test_table_1.id = test_table_2.id; -LOG: join order: [ "test_table_1" ][ single range partition join "test_table_2" ] +LOG: join order: [ "test_table_1" ][ dual partition join "test_table_2" ] count --------------------------------------------------------------------- 9