Skip to content

Commit 99052a6

Browse files
committed
generate correct ppi, fixes
1 parent fbda4ec commit 99052a6

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

hooks.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ pathman_join_pathlist_hook(PlannerInfo *root,
9494

9595
foreach (lc, innerrel->pathlist)
9696
{
97-
AppendPath *cur_inner_path = (AppendPath *) lfirst(lc);
97+
AppendPath *cur_inner_path = (AppendPath *) lfirst(lc);
98+
ParamPathInfo *ppi;
9899

99100
if (!IsA(cur_inner_path, AppendPath))
100101
continue;
@@ -104,9 +105,10 @@ pathman_join_pathlist_hook(PlannerInfo *root,
104105
inner_required = bms_union(PATH_REQ_OUTER((Path *) cur_inner_path),
105106
bms_make_singleton(outerrel->relid));
106107

108+
ppi = get_baserel_parampathinfo(root, innerrel, inner_required);
109+
107110
inner = create_runtimeappend_path(root, cur_inner_path,
108-
get_appendrel_parampathinfo(innerrel,
109-
inner_required),
111+
ppi,
110112
paramsel);
111113

112114
initial_cost_nestloop(root, &workspace, jointype,

nodes_common.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,8 @@ create_append_plan_common(PlannerInfo *root, RelOptInfo *rel,
340340
tlist = cscan->custom_scan_tlist;
341341
}
342342
}
343-
else
343+
/* Don't generate useless physical tlists that will be replaced */
344+
else if (!cscan->custom_scan_tlist)
344345
child_plan->targetlist = build_physical_tlist(root, child_rel);
345346
}
346347

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy