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

Function add_join_rel

src/backend/optimizer/util/relnode.c:730–749  ·  view source on GitHub ↗

* add_join_rel * Add given join relation to the list of join relations in the given * PlannerInfo. Also add it to the auxiliary hashtable if there is one. */

Source from the content-addressed store, hash-verified

728 * PlannerInfo. Also add it to the auxiliary hashtable if there is one.
729 */
730static void
731add_join_rel(PlannerInfo *root, RelOptInfo *joinrel)
732{
733 /* GEQO requires us to append the new joinrel to the end of the list! */
734 root->join_rel_list = lappend(root->join_rel_list, joinrel);
735
736 /* store it into the auxiliary hashtable if there is one. */
737 if (root->join_rel_hash)
738 {
739 JoinHashEntry *hentry;
740 bool found;
741
742 hentry = (JoinHashEntry *) hash_search(root->join_rel_hash,
743 &(joinrel->relids),
744 HASH_ENTER,
745 &found);
746 Assert(!found);
747 hentry->join_rel = joinrel;
748 }
749}
750
751/*
752 * add_grouped_rel_agg_info

Callers 2

build_join_relFunction · 0.85
build_child_join_relFunction · 0.85

Calls 2

lappendFunction · 0.85
hash_searchFunction · 0.85

Tested by

no test coverage detected