[ https://issues.apache.org/jira/browse/HIVE-25065?focusedWorklogId=590496&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-590496 ]
ASF GitHub Bot logged work on HIVE-25065: ----------------------------------------- Author: ASF GitHub Bot Created on: 28/Apr/21 16:26 Start Date: 28/Apr/21 16:26 Worklog Time Spent: 10m Work Description: marton-bod commented on a change in pull request #2230: URL: https://github.com/apache/hive/pull/2230#discussion_r622344816 ########## File path: iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergMetaHook.java ########## @@ -251,6 +254,21 @@ public void commitAlterTable(org.apache.hadoop.hive.metastore.api.Table hmsTable } HiveTableUtil.importFiles(preAlterTableProperties.tableLocation, preAlterTableProperties.format, partitionSpecProxy, preAlterTableProperties.partitionKeys, catalogProperties, conf); + } else { + Map<String, String> contextProperties = context.getProperties(); + if (contextProperties.containsKey(ALTER_TABLE_OPERATION_TYPE) && + allowedAlterTypes.contains(contextProperties.get(ALTER_TABLE_OPERATION_TYPE))) { + Map<String, String> hmsTableParameters = hmsTable.getParameters(); + Splitter splitter = Splitter.on(PROPERTIES_SEPARATOR); + UpdateProperties icebergUpdateProperties = icebergTable.updateProperties(); + if (contextProperties.containsKey(SET_PROPERTIES)) { + splitter.splitToList(contextProperties.get(SET_PROPERTIES)) + .forEach(k -> icebergUpdateProperties.set(k, hmsTableParameters.get(k))); + } else { Review comment: maybe make this `else if (contextProperties.containsKey(UNSET_PROPERTIES))`? We might later call this method from other alter table ops (e.g. schema change) and we wouldn't want to enter this block then -- 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 Issue Time Tracking ------------------- Worklog Id: (was: 590496) Time Spent: 2h 10m (was: 2h) > Implement ALTER TABLE for setting iceberg table properties > ---------------------------------------------------------- > > Key: HIVE-25065 > URL: https://issues.apache.org/jira/browse/HIVE-25065 > Project: Hive > Issue Type: Improvement > Reporter: László Pintér > Assignee: László Pintér > Priority: Major > Labels: pull-request-available > Time Spent: 2h 10m > Remaining Estimate: 0h > > Currently, only the Iceberg -> HMS table property synchronization is > implemented. > We would like to make sure that {{ALTER TABLE SET TBLPROPERTIES()}} will > update the Iceberg table properties as well. -- This message was sent by Atlassian Jira (v8.3.4#803005)