* directly to clause_selectivity(). None of what we might do below is
* relevant.
*/
- if ((list_length(clauses) == 1) &&
- bms_num_members(estimatedclauses) == 0)
+ if (list_length(clauses) == 1 && bms_is_empty(estimatedclauses))
return clause_selectivity(root, (Node *) linitial(clauses),
varRelid, jointype, sjinfo);
* of clauses. We must return 1.0 so the calling function's selectivity is
* unaffected.
*/
- if (bms_num_members(clauses_attnums) < 2)
+ if (bms_membership(clauses_attnums) != BMS_MULTIPLE)
{
bms_free(clauses_attnums);
pfree(list_attnums);
{
StatisticExtInfo *stat = (StatisticExtInfo *) lfirst(l);
Bitmapset *matched;
- int num_matched;
+ BMS_Membership membership;
/* skip statistics that are not of the correct type */
if (stat->kind != STATS_EXT_DEPENDENCIES)
continue;
matched = bms_intersect(clauses_attnums, stat->keys);
- num_matched = bms_num_members(matched);
+ membership = bms_membership(matched);
bms_free(matched);
/* skip objects matching fewer than two attributes from clauses */
- if (num_matched < 2)
+ if (membership != BMS_MULTIPLE)
continue;
func_dependencies[nfunc_dependencies]