hi. about v50. +/* + * JsonTableSiblingJoin - + * Plan to union-join rows of nested paths of the same level + */ +typedef struct JsonTableSiblingJoin +{ + JsonTablePlan plan; + + JsonTablePlan *lplan; + JsonTablePlan *rplan; +} JsonTableSiblingJoin;
"Plan to union-join rows of nested paths of the same level" same level problem misleading? I think it means "Plan to union-join rows of top level columns clause is a nested path" + if (IsA(planstate->plan, JsonTableSiblingJoin)) + { + /* Fetch new from left sibling. */ + if (!JsonTablePlanNextRow(planstate->left)) + { + /* + * Left sibling ran out of rows, fetch new from right sibling. + */ + if (!JsonTablePlanNextRow(planstate->right)) + { + /* Right sibling and thus the plan has now more rows. */ + return false; + } + } + } /* Right sibling and thus the plan has now more rows. */ I think you mean: /* Right sibling ran out of rows and thus the plan has no more rows. */ in <synopsis> section, + | NESTED PATH <replaceable>json_path_specification</replaceable> <optional> AS <replaceable>path_name</replaceable> </optional> + COLUMNS ( <replaceable>json_table_column</replaceable> <optional>, ...</optional> ) maybe make it into one line. | NESTED PATH <replaceable>json_path_specification</replaceable> <optional> AS <replaceable>path_name</replaceable> </optional> COLUMNS ( <replaceable>json_table_column</replaceable> <optional>, ...</optional> ) since the surrounding pattern is the next line beginning with "[", meaning that next line is optional. + at arbitrary nesting levels. maybe + at arbitrary nested level. in src/tools/pgindent/typedefs.list, "JsonPathSpec" is unnecessary. other than that, it looks good to me.