From 98d98ddab02c36bf7ed2faa614c86f29d487d929 Mon Sep 17 00:00:00 2001 From: James Coleman Date: Sat, 3 Oct 2020 22:05:08 -0400 Subject: [PATCH v2 2/2] questions --- src/backend/optimizer/plan/planner.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/backend/optimizer/plan/planner.c b/src/backend/optimizer/plan/planner.c index a48721d2fc..45463946b5 100644 --- a/src/backend/optimizer/plan/planner.c +++ b/src/backend/optimizer/plan/planner.c @@ -5021,6 +5021,10 @@ create_ordered_paths(PlannerInfo *root, root->sort_pathkeys, limit_tuples); /* Add projection step if needed */ + /* TODO: why don't we apply the projection to the path + * before sorting? Is it because it's already been done + * by apply_scanjoin_target_to_paths? + */ if (sorted_path->pathtarget != target) sorted_path = apply_projection_to_path(root, ordered_rel, sorted_path, target); @@ -5051,6 +5055,10 @@ create_ordered_paths(PlannerInfo *root, limit_tuples); /* Add projection step if needed */ + /* TODO: why don't we apply the projection to the path + * before sorting? Is it because it's already been done + * by apply_scanjoin_target_to_paths? + */ if (sorted_path->pathtarget != target) sorted_path = apply_projection_to_path(root, ordered_rel, sorted_path, target); @@ -5102,6 +5110,10 @@ create_ordered_paths(PlannerInfo *root, &total_groups); /* Add projection step if needed */ + /* TODO: why can't we apply the projection to the partial + * path? Is it because it's already been done if possible + * by apply_scanjoin_target_to_paths? + */ if (path->pathtarget != target) path = apply_projection_to_path(root, ordered_rel, path, target); @@ -5163,6 +5175,10 @@ create_ordered_paths(PlannerInfo *root, &total_groups); /* Add projection step if needed */ + /* TODO: why can't we apply the projection to the partial + * path? Is it because it's already been done if possible + * by apply_scanjoin_target_to_paths? + */ if (sorted_path->pathtarget != target) sorted_path = apply_projection_to_path(root, ordered_rel, sorted_path, target); -- 2.17.1