diff options
Diffstat (limited to 'src/backend/optimizer/prep/prepunion.c')
-rw-r--r-- | src/backend/optimizer/prep/prepunion.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/backend/optimizer/prep/prepunion.c b/src/backend/optimizer/prep/prepunion.c index 1c69c6e97e8..a0baf6d4a18 100644 --- a/src/backend/optimizer/prep/prepunion.c +++ b/src/backend/optimizer/prep/prepunion.c @@ -1346,6 +1346,7 @@ choose_hashed_setop(PlannerInfo *root, List *groupClauses, cost_agg(&hashed_p, root, AGG_HASHED, NULL, numGroupCols, dNumGroups, NIL, + input_path->disabled_nodes, input_path->startup_cost, input_path->total_cost, input_path->rows, input_path->pathtarget->width); @@ -1353,14 +1354,17 @@ choose_hashed_setop(PlannerInfo *root, List *groupClauses, * Now for the sorted case. Note that the input is *always* unsorted, * since it was made by appending unrelated sub-relations together. */ + sorted_p.disabled_nodes = input_path->disabled_nodes; sorted_p.startup_cost = input_path->startup_cost; sorted_p.total_cost = input_path->total_cost; /* XXX cost_sort doesn't actually look at pathkeys, so just pass NIL */ - cost_sort(&sorted_p, root, NIL, sorted_p.total_cost, + cost_sort(&sorted_p, root, NIL, sorted_p.disabled_nodes, + sorted_p.total_cost, input_path->rows, input_path->pathtarget->width, 0.0, work_mem, -1.0); cost_group(&sorted_p, root, numGroupCols, dNumGroups, NIL, + sorted_p.disabled_nodes, sorted_p.startup_cost, sorted_p.total_cost, input_path->rows); |