diff options
author | Robert Haas | 2025-07-16 20:19:13 +0000 |
---|---|---|
committer | Robert Haas | 2025-07-16 20:19:13 +0000 |
commit | f60fe2cab20fec5df795fc7e5953d6de769bf0cf (patch) | |
tree | 9e4bd086716aa7726babd751c98c3f0c45026d4b | |
parent | 1eeba5160b181b76ac219e747eba922c2e40ed58 (diff) |
address XXX by addingg comments
-rw-r--r-- | contrib/pg_plan_advice/pgpa_join.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/contrib/pg_plan_advice/pgpa_join.c b/contrib/pg_plan_advice/pgpa_join.c index f6722f1594..dd5c2411ae 100644 --- a/contrib/pg_plan_advice/pgpa_join.c +++ b/contrib/pg_plan_advice/pgpa_join.c @@ -84,7 +84,22 @@ pgpa_create_join_unroller(void) /* * Unroll one level of an unrollable join tree. * - * XXX. More comments. + * Our basic goal here is to unroll join trees as they occur in the Plan + * tree into a simpler and more regular structure that we can more easily + * use for further processing. Unrolling is outer-deep, so if the plan tree + * has Join1(Join2(A,B),Join3(C,D)), the same join unroller object should be + * used for Join1 and Join2, but a different one will be needed for Join3, + * since that involves a join within the *inner* side of another join. + * + * pgpa_plan_walker creates a "top level" join unroller object when it + * encounters a join in a portion of the plan tree in which no join unroller + * is already active. From there, this function is responsible for determing + * to what portion of the plan tree that join unroller applies, and for + * creating any subordinate join unroller objects that are needed as a result + * of non-outer-deep join trees. We do this by returning the join unroller + * objects that should be used for further traversal of the outer and inner + * subtrees of the current plan node via *outer_join_unroller and + * *inner_join_unroller, respectively. */ void pgpa_unroll_join(pgpa_plan_walker_context *walker, Plan *plan, |