wecharyu commented on code in PR #6126:
URL: https://github.com/apache/hive/pull/6126#discussion_r2445332209
##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HiveAlterHandler.java:
##########
@@ -754,24 +766,10 @@ public Partition alterPartition(RawStore msdb, Warehouse
wh, String catName, Str
new_part, tbl, wh, false, true, environmentContext, false);
}
- String newPartName = Warehouse.makePartName(tbl.getPartitionKeys(),
new_part.getValues());
- List<ColumnStatistics> multiColumnStats =
updateOrGetPartitionColumnStats(msdb, catName, dbname, name,
oldPart.getValues(),
- oldPart.getSd().getCols(), tbl, new_part, null, null);
- msdb.alterPartition(catName, dbname, name, part_vals, new_part,
validWriteIds);
- if (!multiColumnStats.isEmpty()) {
- for (ColumnStatistics cs : multiColumnStats) {
- cs.getStatsDesc().setPartName(newPartName);
- try {
- msdb.updatePartitionColumnStatistics(tbl, mTable, cs,
new_part.getValues(),
- validWriteIds, new_part.getWriteId());
- } catch (InvalidInputException iie) {
- throw new InvalidOperationException("Unable to update partition
stats in table rename." + iie);
- } catch (NoSuchObjectException nsoe) {
- // It is ok, ignore
- }
- }
- }
+ updateOrGetPartitionColumnStats(msdb, catName, dbname, name,
oldPart.getValues(),
Review Comment:
Got it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]