code: public void addOrAlterPartition(HiveTable table, HivePartition partition) throws IOException {
      if (!addPartitionIfNotExists(table, partition)) {
        alterPartition(table, partition);
      }
    }
docs: Add a partition to a table if not exists, or alter a partition if exists.
  
  @param table the {@link HiveTable} to which the partition belongs.
  @param partition a {@link HivePartition} to which the existing partition should be updated.
  @throws IOException