!467 Extract restriction OR clauses whether or not they are indexable.

Merge pull request !467 from 吴岳川/master
This commit is contained in:
opengauss-bot
2020-12-28 20:36:23 +08:00
committed by Gitee
15 changed files with 650 additions and 410 deletions

View File

@ -741,16 +741,6 @@ static void set_plain_rel_size(PlannerInfo* root, RelOptInfo* rel, RangeTblEntry
if (rte->tablesample == NULL) {
/* Mark rel with estimated output rows, width, etc */
set_baserel_size_estimates(root, rel);
/*
* Check to see if we can extract any restriction conditions from join
* quals that are OR-of-AND structures. If so, add them to the rel's
* restriction list, and redo the above steps.
*/
if (create_or_index_quals(root, rel)) {
check_partial_indexes(root, rel);
set_baserel_size_estimates(root, rel);
}
} else {
/* Sampled relation */
set_tablesample_rel_size(root, rel, rte);