@Override
  protected void doAlteration(Table table, Partition partition) throws HiveException {
    //StorageDescriptor sd = getStorageDescriptor(table, partition);
    String serializationLib = table.getSd().getSerdeInfo().getSerializationLib();

    Collection<String> serdes = MetastoreConf.getStringCollection(context.getConf(),
        MetastoreConf.ConfVars.SERDES_USING_METASTORE_FOR_SCHEMA);
    if (serdes.contains(serializationLib)) {
      throw new HiveException(table.getTableName() + " has serde " + serializationLib + " for which schema " +
          "is already handled by HMS.");
    }

    Deserializer deserializer = table.getDeserializer(true);
    try {
      LOG.info("Updating metastore columns for table: {}", table.getTableName());
      List<FieldSchema> fields = HiveMetaStoreUtils.getFieldsFromDeserializer(table.getTableName(), deserializer,
          context.getConf());
      StorageDescriptor sd = getStorageDescriptor(table, partition);
      sd.setCols(fields);
    } catch (org.apache.hadoop.hive.serde2.SerDeException | MetaException e) {
      LOG.error("alter table update columns: {}", e);
      throw new HiveException(e, ErrorMsg.GENERIC_ERROR);
    }
  }
Operation process of adding some new columns.
ql/src/java/org/apache/hadoop/hive/ql/ddl/table/column/update/AlterTableUpdateColumnsOperation.java