(self, old, new)
Rename the old schema/identifier to the new schema/identifier and
        update references.

        If the new schema/identifier is already present, that is an error.
        If the schema/identifier key is absent, we only debug log and return,
        assuming it's a temp table being renamed.

        :param BaseRelation old: The existing relation name information.
        :param BaseRelation new: The new relation name information.
        :raises InternalError: If the new key is already present.
Rename the old schema/identifier to the new schema/identifier and
        update references.
Rename the old schema / identifier to the new schema / identifier and update references .
def rename(self, old, new):
        """Rename the old schema/identifier to the new schema/identifier and
        update references.

        If the new schema/identifier is already present, that is an error.
        If the schema/identifier key is absent, we only debug log and return,
        assuming it's a temp table being renamed.

        :param BaseRelation old: The existing relation name information.
        :param BaseRelation new: The new relation name information.
        :raises InternalError: If the new key is already present.
        """
        old_key = _make_key(old)
        new_key = _make_key(new)
        fire_event(RenameSchema(old_key=old_key, new_key=new_key))

        fire_event(DumpBeforeRenameSchema(dump=self.dump_graph()))

        with self.lock:
            if self._check_rename_constraints(old_key, new_key):
                self._rename_relation(old_key, _CachedRelation(new))
            else:
                self._setdefault(_CachedRelation(new))

        fire_event(DumpAfterRenameSchema(dump=self.dump_graph()))
def rename ( self , old , new ) : old_key = _make_key ( old ) new_key = _make_key ( new ) fire_event ( RenameSchema ( old_key = old_key , new_key = new_key ) ) fire_event ( DumpBeforeRenameSchema ( dump = self . dump_graph ( ) ) ) with self . lock : if self . _check_rename_constraints ( old_key , new_key ) : self . _rename_relation ( old_key , _CachedRelation ( new ) ) else : self . _setdefault ( _CachedRelation ( new ) ) fire_event ( DumpAfterRenameSchema ( dump = self . dump_graph ( ) ) )