* calc_non_nestloop_required_outer * Compute the required_outer set for a merge or hash join path * * Note: result must not share storage with either input */
| 3835 | * Note: result must not share storage with either input |
| 3836 | */ |
| 3837 | Relids |
| 3838 | calc_non_nestloop_required_outer(Path *outer_path, Path *inner_path) |
| 3839 | { |
| 3840 | Relids outer_paramrels = PATH_REQ_OUTER(outer_path); |
| 3841 | Relids inner_paramrels = PATH_REQ_OUTER(inner_path); |
| 3842 | Relids required_outer; |
| 3843 | |
| 3844 | /* neither path can require rels from the other */ |
| 3845 | Assert(!bms_overlap(outer_paramrels, inner_path->parent->relids)); |
| 3846 | Assert(!bms_overlap(inner_paramrels, outer_path->parent->relids)); |
| 3847 | /* form the union ... */ |
| 3848 | required_outer = bms_union(outer_paramrels, inner_paramrels); |
| 3849 | /* we do not need an explicit test for empty; bms_union gets it right */ |
| 3850 | return required_outer; |
| 3851 | } |
| 3852 | |
| 3853 | /* |
| 3854 | * create_nestloop_path |
no test coverage detected