private void alterTable(Table tbl) throws HiveException {
    context.getDb().alterTable(tbl, false, null, true);
    context.getWork().getInputs().add(new ReadEntity(tbl));
    // We've already locked the table as the input, don't relock it as the output.
    DDLUtils.addIfAbsentByName(new WriteEntity(tbl, WriteEntity.WriteType.DDL_NO_LOCK), context);
  }
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