Skip to content

Commit 761a41c

Browse files
committed
tests with parameterized paths
1 parent 9eed4d5 commit 761a41c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pickyappend.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ create_pickyappend_path(PlannerInfo *root,
185185
ParamPathInfo *param_info,
186186
JoinPathExtraData *extra)
187187
{
188-
AppendPath *inner_append = (AppendPath *) innerrel->cheapest_total_path;
188+
AppendPath *inner_append = (AppendPath *) linitial(innerrel->cheapest_parameterized_paths);
189189
List *joinrestrictclauses = extra->restrictlist;
190190
List *joinclauses;
191191
List *otherclauses;
@@ -282,7 +282,7 @@ pathman_join_pathlist_hook(PlannerInfo *root,
282282

283283
if (innerrel->reloptkind == RELOPT_BASEREL &&
284284
inner_entry->inh &&
285-
IsA(innerrel->cheapest_total_path, AppendPath) &&
285+
IsA(linitial(innerrel->cheapest_parameterized_paths), AppendPath) &&
286286
(inner_prel = get_pathman_relation_info(inner_entry->relid, NULL)))
287287
{
288288
elog(LOG, "adding new nestloop path with pickyappend");
@@ -291,7 +291,7 @@ pathman_join_pathlist_hook(PlannerInfo *root,
291291

292292
outer = outerrel->cheapest_total_path;
293293

294-
inner_required = bms_union(PATH_REQ_OUTER(innerrel->cheapest_total_path),
294+
inner_required = bms_union(PATH_REQ_OUTER((Path*)linitial(innerrel->cheapest_parameterized_paths)),
295295
bms_make_singleton(outerrel->relid));
296296

297297
inner = create_pickyappend_path(root, joinrel, outerrel, innerrel,

0 commit comments

Comments
 (0)