static RelOptInfo * saio_main(PlannerInfo *root, int levels_needed, List *initial_rels) { if (enable_saio && levels_needed >= saio_threshold) return saio(root, levels_needed, initial_rels); else if (enable_geqo && levels_needed >= geqo_threshold) return geqo(root, levels_needed, initial_rels); else return standard_join_search(root, levels_needed, initial_rels); }
/* * get_combiner_join_rel * * Gets the input rel for a combine plan, which only ever needs to read from a TuplestoreScan * because the workers have already done most of the work */ static RelOptInfo * get_combiner_join_rel(PlannerInfo *root, int levels_needed, List *initial_rels) { RelOptInfo *rel; Path *path; rel = standard_join_search(root, levels_needed, initial_rels); rel->pathlist = NIL; path = create_tuplestore_scan_path(rel); add_path(rel, path); set_cheapest(rel); return rel; }