From: Robert Haas Date: Wed, 16 Jul 2025 20:19:13 +0000 (-0400) Subject: address XXX by addingg comments X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=f60fe2cab20fec5df795fc7e5953d6de769bf0cf;p=users%2Frhaas%2Fpostgres.git address XXX by addingg comments --- 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,