pvary commented on a change in pull request #2230: URL: https://github.com/apache/hive/pull/2230#discussion_r621938901
########## File path: ql/src/java/org/apache/hadoop/hive/ql/ddl/table/AbstractAlterTableOperation.java ########## @@ -136,6 +137,22 @@ private void finalizeAlterTableWithWriteIdOp(Table table, Table oldTable, List<P try { environmentContext.putToProperties(HiveMetaHook.ALTER_TABLE_OPERATION_TYPE, desc.getType().name()); + if (desc.getType() == AlterTableType.ADDPROPS) { + Map<String, String> oldTableParameters = oldTable.getParameters(); + environmentContext.putToProperties(HiveMetaHook.SET_PROPERTIES, + table.getParameters().entrySet().stream() + .filter(e -> !oldTableParameters.containsKey(e.getKey()) || + !oldTableParameters.get(e.getKey()).equals(e.getValue())) + .map(Map.Entry::getKey) + .collect(Collectors.joining(HiveMetaHook.PROPERTIES_SEPARATOR))); Review comment: Does this handle the situation where the separator appears in one of the key/value? -- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org