@Override
  protected void doAlteration(Table table, Partition partition) throws HiveException {
    if (desc.getOwnerPrincipal() != null) {
      table.setOwner(desc.getOwnerPrincipal().getName());
      table.setOwnerType(desc.getOwnerPrincipal().getType());
    }
  }
Operation process of setting the owner of a table.
ql/src/java/org/apache/hadoop/hive/ql/ddl/table/misc/owner/AlterTableSetOwnerOperation.java