Index: ql/src/java/org/apache/hadoop/hive/ql/parse/BaseSemanticAnalyzer.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/parse/BaseSemanticAnalyzer.java (revision 4658) +++ ql/src/java/org/apache/hadoop/hive/ql/parse/BaseSemanticAnalyzer.java (working copy) @@ -432,8 +432,13 @@ .toLowerCase()), val); } try { - // this doesn't create partition. partition is created in MoveTask - partHandle = new Partition(tableHandle, partSpec, null); + // In case the partition already exists, we need to get the partition + // data from the metastore + partHandle = db.getPartition(tableHandle, partSpec, false); + if(partHandle == null) { + // this doesn't create partition. partition is created in MoveTask + partHandle = new Partition(tableHandle, partSpec, null); + } } catch (HiveException e) { throw new SemanticException(ErrorMsg.INVALID_PARTITION.getMsg(ast .getChild(childIndex)));