@Override
  public void alter_table(String dbname, String tbl_name,
      org.apache.hadoop.hive.metastore.api.Table new_tbl) throws TException {
    org.apache.hadoop.hive.metastore.api.Table old_tbl = getTempTable(dbname, tbl_name);
    if (old_tbl != null) {
      // actually temp table does not support partitions, cascade is not
      // applicable here
      alterTempTable(dbname, tbl_name, old_tbl, new_tbl, null);
      return;
    }
    super.alter_table(dbname, tbl_name, new_tbl);
  }
todo: This need review re: thread safety.  Various places (see callsers of
{@link SessionState#setCurrentSessionState(SessionState)}) pass SessionState to forked threads.
Currently it looks like those threads only read metadata but this is fragile.
Also, maps (in SessionState) where tempt table metadata is stored are concurrent and so
any put/get crosses a memory barrier and so does using most {@code java.util.concurrent.*}
so the readers of the objects in these maps should have the most recent view of the object.
But again, could be fragile.
ql/src/java/org/apache/hadoop/hive/ql/metadata/SessionHiveMetaStoreClient.java