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

Function get_cheaper_rel

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

Source from the content-addressed store, hash-verified

886}
887
888static RelOptInfo *
889get_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

Callers 1

find_grouped_relFunction · 0.85

Calls 1

compare_path_costsFunction · 0.85

Tested by

no test coverage detected