Hi: For a given level for join_search_one_level, it is always try to join every relation in joinrel[level-1] to *initial_rels*. but the current code doesn't show this directly.
join_search_one_level
if (level == 2) /* consider remaining
initial rels */
{
other_rels_list = joinrels[level - 1];
other_rels = lnext(other_rels_list, r);
}
else /* consider all
initial rels */
{
other_rels_list = joinrels[1];
other_rels = list_head(other_rels_list);
}
make_rels_by_clause_joins(root,
old_rel,
other_rels_list,
other_rels);
I'd like to remove the parameter and use root->inital_rels directly. I did
the same
for make_rels_by_clauseless_joins. The attached is my proposal which
should be
semantic correctly and more explicitly.
Best Regards
Andy Fan
v1-0001-Remove-other_rels_list-from-make_rels_by_clause_j.patch
Description: Binary data
