MCPcopy Create free account
hub / github.com/apache/cloudberry / calc_non_nestloop_required_outer

Function calc_non_nestloop_required_outer

src/backend/optimizer/util/pathnode.c:3837–3851  ·  view source on GitHub ↗

* 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 */

Source from the content-addressed store, hash-verified

3835 * Note: result must not share storage with either input
3836 */
3837Relids
3838calc_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

Callers 2

try_mergejoin_pathFunction · 0.85
try_hashjoin_pathFunction · 0.85

Calls 2

bms_overlapFunction · 0.85
bms_unionFunction · 0.85

Tested by

no test coverage detected