![]() |
ProvSQL C/C++ API
Adding support for provenance and uncertainty management to PostgreSQL databases
|
Lower an outer JOIN of two tracked arms into the UNION-ALL of its matched and null-padded antijoin arms.
More...
Public Attributes | |
| Index | r_idx |
| left arm of the outer join being lowered | |
| Index | s_idx |
| right arm | |
| int | sublevels_up |
| current query nesting depth | |
| bool | found |
| a whole-row or system-column reference to an arm | |
Lower an outer JOIN of two tracked arms into the UNION-ALL of its matched and null-padded antijoin arms.
Fires only on a SELECT whose jointree->fromlist == [JoinExpr(JOIN_LEFT|JOIN_RIGHT|JOIN_FULL, RTR, RTR)], each arm a provenance-tracked base relation or non-LATERAL subquery, and where no Var references the join RTE directly (so no USING / NATURAL merged column). The subquery replaces the join's range-table slot and the two arm RTEs are neutralized. Everything else falls through unchanged: a chain of outer joins, an outer join beside other FROM items, an untracked arm. What falls through with a tracked relation on a null-padded side is refused by check_unlowered_outer_joins; a join whose padded side is untracked is sound as it stands.
true if the query was rewritten.Context for oj_syscol_walker.
| bool oj_syscol_ctx::found |
| Index oj_syscol_ctx::r_idx |
| int oj_syscol_ctx::sublevels_up |