@Override
  protected void doAlteration(Table table, Partition partition) throws HiveException {
    // Validation's been done at compile time. no validation is needed here.
    List<String> skewedColNames = desc.getSkewedColumnNames();
    List<List<String>> skewedValues = desc.getSkewedColumnValues();

    if (table.getSkewedInfo() == null) {
      table.setSkewedInfo(new SkewedInfo());
    }
    table.setSkewedColNames(skewedColNames);
    table.setSkewedColValues(skewedValues);

    table.setStoredAsSubDirectories(desc.isStoredAsDirectories());
  }
Operation process of setting the location of a table.
ql/src/java/org/apache/hadoop/hive/ql/ddl/table/storage/skewed/AlterTableSkewedByOperation.java