private void setNewPartitionKeys(Table tbl) {
    List<FieldSchema> newPartitionKeys = new ArrayList<FieldSchema>();
    for (FieldSchema col : tbl.getTTable().getPartitionKeys()) {
      if (col.getName().compareTo(desc.getPartKeyName()) == 0) {
        newPartitionKeys.add(desc.getPartKeySpec());
      } else {
        newPartitionKeys.add(col);
      }
    }

    tbl.getTTable().setPartitionKeys(newPartitionKeys);
  }
Check if the existing partition values can be type casted to the new column type
with a non null value before trying to alter the partition column type.
ql/src/java/org/apache/hadoop/hive/ql/ddl/table/partition/alter/AlterTableAlterPartitionOperation.java