Re: Missing MaterialPath support in reparameterize_path_by_child
От | Richard Guo |
---|---|
Тема | Re: Missing MaterialPath support in reparameterize_path_by_child |
Дата | |
Msg-id | CAMbWs4_x6ZBFF1aNvLn=HNGo6SJ3ryTDvKdjeZtEdquc7J5jSQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Missing MaterialPath support in reparameterize_path_by_child (Richard Guo <guofenglinux@gmail.com>) |
Список | pgsql-hackers |
On Fri, Dec 2, 2022 at 8:49 PM Richard Guo <guofenglinux@gmail.com> wrote:
BTW, the code changes I'm using:
--- a/src/backend/optimizer/util/pathnode.c
+++ b/src/backend/optimizer/util/pathnode.c
@@ -3979,6 +3979,17 @@ reparameterize_path(PlannerInfo *root, Path *path,
apath->path.parallel_aware,
-1);
}
+ case T_Material:
+ {
+ MaterialPath *matpath = (MaterialPath *) path;
+ Path *spath = matpath->subpath;
+
+ spath = reparameterize_path(root, spath,
+ required_outer,
+ loop_count);
+
+ return (Path *) create_material_path(rel, spath);
+ }
BTW, the subpath needs to be checked if it is null after being
reparameterized, since it might be a path type that is not supported
yet.
--- a/src/backend/optimizer/util/pathnode.c
+++ b/src/backend/optimizer/util/pathnode.c
@@ -3979,6 +3979,19 @@ reparameterize_path(PlannerInfo *root, Path *path,
apath->path.parallel_aware,
-1);
}
+ case T_Material:
+ {
+ MaterialPath *matpath = (MaterialPath *) path;
+ Path *spath = matpath->subpath;
+
+ spath = reparameterize_path(root, spath,
+ required_outer,
+ loop_count);
+ if (spath == NULL)
+ return NULL;
+
+ return (Path *) create_material_path(rel, spath);
+ }
Thanks
Richard
reparameterized, since it might be a path type that is not supported
yet.
--- a/src/backend/optimizer/util/pathnode.c
+++ b/src/backend/optimizer/util/pathnode.c
@@ -3979,6 +3979,19 @@ reparameterize_path(PlannerInfo *root, Path *path,
apath->path.parallel_aware,
-1);
}
+ case T_Material:
+ {
+ MaterialPath *matpath = (MaterialPath *) path;
+ Path *spath = matpath->subpath;
+
+ spath = reparameterize_path(root, spath,
+ required_outer,
+ loop_count);
+ if (spath == NULL)
+ return NULL;
+
+ return (Path *) create_material_path(rel, spath);
+ }
Thanks
Richard
В списке pgsql-hackers по дате отправления: