Skip to content

Commit 2ce5c62

Browse files
committed
fixes for JOIN_UNIQUE_OUTER & JOIN_UNIQUE_INNER
1 parent 3629c43 commit 2ce5c62

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

join_hook.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ pathman_join_pathlist_hook(PlannerInfo *root,
3232
set_join_pathlist_next(root, joinrel, outerrel,
3333
innerrel, jointype, extra);
3434

35+
if (jointype == JOIN_UNIQUE_OUTER ||
36+
jointype == JOIN_UNIQUE_INNER)
37+
{
38+
jointype = JOIN_INNER;
39+
}
40+
3541
if (jointype == JOIN_FULL || !pg_pathman_enable_pickyappend)
3642
return;
3743

nodes_common.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@ typedef struct
1616

1717
typedef struct
1818
{
19-
Oid relid; /* partition relid */
19+
Oid relid; /* partition relid */
2020

2121
union
2222
{
2323
Path *path;
2424
Plan *plan;
2525
PlanState *plan_state;
26-
} content;
26+
} content;
2727

28-
int original_order; /* for sorting in EXPLAIN */
28+
int original_order; /* for sorting in EXPLAIN */
2929
} ChildScanCommonData;
3030

3131
typedef ChildScanCommonData *ChildScanCommon;

0 commit comments

Comments
 (0)