def _make_distinct_join_predicates(left, right, predicates):
    if left.equals(right):
        right = right.view()
    predicates = _clean_join_predicates(left, right, predicates)
    return (left, right, predicates)
def _make_distinct_join_predicates(left, right, predicates):
    if left.equals(right):
        right = right.view()
    predicates = _clean_join_predicates(left, right, predicates)
    return (left, right, predicates)