'append a JOIN to the query\'s from clause.'

def _join_left_to_right(self, left, right, onclause, outerjoin, create_aliases, prop):

    self._polymorphic_adapters = self._polymorphic_adapters.copy()
    if (left is None):
        if self._from_obj:
            left = self._from_obj[0]
        elif self._entities:
            left = self._entities[0].entity_zero_or_selectable
    if (left is None):
        raise sa_exc.InvalidRequestError(("Don't    know    how    to    join    from    %s;    please    use    select_from()    to    establish    the    left    entity/selectable    of    this    join" % self._entities[0]))
    if ((left is right) and (not create_aliases)):
        raise sa_exc.InvalidRequestError(("Can't    construct    a    join    from    %s    to    %s,    they    are    the    same    entity" % (left, right)))
    l_info = inspect(left)
    r_info = inspect(right)
    overlap = False
    if (not create_aliases):
        right_mapper = getattr(r_info, 'mapper', None)
        if (right_mapper and (right_mapper.with_polymorphic or isinstance(right_mapper.mapped_table, expression.Join))):
            for from_obj in (self._from_obj or [l_info.selectable]):
                if (sql_util.selectables_overlap(l_info.selectable, from_obj) and sql_util.selectables_overlap(from_obj, r_info.selectable)):
                    overlap = True
                    break
        elif sql_util.selectables_overlap(l_info.selectable, r_info.selectable):
            overlap = True
    if (overlap and (l_info.selectable is r_info.selectable)):
        raise sa_exc.InvalidRequestError(("Can't    join    table/selectable    '%s'    to    itself" % l_info.selectable))
    (right, onclause) = self._prepare_right_side(r_info, right, onclause, create_aliases, prop, overlap)
    if ((not create_aliases) and prop):
        self._update_joinpoint({'_joinpoint_entity': right, 'prev': ((left, right, prop.key), self._joinpoint)})
    else:
        self._joinpoint = {'_joinpoint_entity': right}
    self._join_to_left(l_info, left, right, onclause, outerjoin)
