use of org.apache.iceberg.relocated.com.google.common.base.Splitter in project hive by apache.
the class HiveIcebergMetaHook method alterTableProperties.
private void alterTableProperties(org.apache.hadoop.hive.metastore.api.Table hmsTable, Map<String, String> contextProperties) {
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 if (contextProperties.containsKey(UNSET_PROPERTIES)) {
splitter.splitToList(contextProperties.get(UNSET_PROPERTIES)).forEach(icebergUpdateProperties::remove);
}
icebergUpdateProperties.commit();
}
Aggregations