| 886 | } |
| 887 | |
| 888 | static RelOptInfo * |
| 889 | get_cheaper_rel(RelOptInfo *rel1, RelOptInfo *rel2) |
| 890 | { |
| 891 | int cmp; |
| 892 | |
| 893 | if (rel1 == NULL || IS_DUMMY_REL(rel1)) |
| 894 | return rel2; |
| 895 | if (rel2 == NULL || IS_DUMMY_REL(rel2)) |
| 896 | return rel1; |
| 897 | |
| 898 | cmp = compare_path_costs(rel1->cheapest_total_path, |
| 899 | rel2->cheapest_total_path, |
| 900 | TOTAL_COST); |
| 901 | return cmp < 0 ? rel1 : rel2; |
| 902 | } |
| 903 | |
| 904 | /* |
| 905 | * find_grouped_rel |
no test coverage detected