'This method is to be used for promoting joins in ORed filters.
The principle for promotion is: any alias which is used (it is in
alias_usage_counts), is not used by every child of the ORed filter,
and isn\'t pre-existing needs to be promoted to LOUTER join.'

def promote_disjunction(self, aliases_before, alias_usage_counts, num_childs):

    for (alias, use_count) in alias_usage_counts.items():
        if ((use_count < num_childs) and (alias not in aliases_before)):
            self.promote_joins([alias])
