diff --git standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java index a1eeb29ec0..211c019152 100644 --- standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java +++ standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java @@ -284,7 +284,7 @@ protected Configuration initialValue() { static final Logger auditLog = LoggerFactory.getLogger( HiveMetaStore.class.getName() + ".audit"); - + private static void logAuditEvent(String cmd) { if (cmd == null) { return; @@ -4352,6 +4352,9 @@ private void alter_table_core(final String dbname, final String name, final Tabl if (org.apache.commons.lang.StringUtils.isNotEmpty(newLocation)) { Path tblPath = wh.getDnsPath(new Path(newLocation)); newTable.getSd().setLocation(tblPath.toString()); + if (newTable.getSd().getSerdeInfo().getParameters().containsKey("path")) { + newTable.getSd().getSerdeInfo().getParameters().put("path", tblPath.toString()); + } } } @@ -6835,7 +6838,7 @@ public boolean set_aggr_stats_for(SetPartitionsStatsRequest request) throws TExc } newStatsMap.put(partName, csNew); } - + Map oldStatsMap = new HashMap<>(); Map mapToPart = new HashMap<>(); if (request.isSetNeedMerge() && request.isNeedMerge()) {