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

Function consider_parallel_mergejoin

src/backend/optimizer/path/joinpath.c:1994–2021  ·  view source on GitHub ↗

* consider_parallel_mergejoin * Try to build partial paths for a joinrel by joining a partial path * for the outer relation to a complete path for the inner relation. * * 'joinrel' is the join relation * 'outerrel' is the outer join relation * 'innerrel' is the inner join relation * 'jointype' is the type of join to do * 'extra' contains additional input values * 'inner_cheapest_total

Source from the content-addressed store, hash-verified

1992 * 'inner_cheapest_total' cheapest total path for innerrel
1993 */
1994static void
1995consider_parallel_mergejoin(PlannerInfo *root,
1996 RelOptInfo *joinrel,
1997 RelOptInfo *outerrel,
1998 RelOptInfo *innerrel,
1999 JoinType jointype,
2000 JoinPathExtraData *extra,
2001 Path *inner_cheapest_total)
2002{
2003 ListCell *lc1;
2004
2005 /* generate merge join path for each partial outer path */
2006 foreach(lc1, outerrel->partial_pathlist)
2007 {
2008 Path *outerpath = (Path *) lfirst(lc1);
2009 List *merge_pathkeys;
2010
2011 /*
2012 * Figure out what useful ordering any paths we create will have.
2013 */
2014 merge_pathkeys = build_join_pathkeys(root, joinrel, jointype,
2015 outerpath->pathkeys);
2016
2017 generate_mergejoin_paths(root, joinrel, innerrel, outerpath, jointype,
2018 extra, false, inner_cheapest_total,
2019 merge_pathkeys, true);
2020 }
2021}
2022
2023/*
2024 * consider_parallel_nestloop

Callers 1

match_unsorted_outerFunction · 0.85

Calls 3

build_join_pathkeysFunction · 0.85
generate_mergejoin_pathsFunction · 0.85
foreachFunction · 0.50

Tested by

no test coverage detected