* 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. */
| 728 | * PlannerInfo. Also add it to the auxiliary hashtable if there is one. |
| 729 | */ |
| 730 | static void |
| 731 | add_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 |
no test coverage detected