deniskuzZ commented on code in PR #4088:
URL: https://github.com/apache/hive/pull/4088#discussion_r1124431214
##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/Catalogs.java:
##########
@@ -243,11 +241,21 @@ static Optional<Catalog> loadCatalog(Configuration conf,
String catalogName) {
* @return complete map of catalog properties
*/
private static Map<String, String> getCatalogProperties(Configuration conf,
String catalogName, String catalogType) {
+ Map<String, String> defaultCatalogProperties = Maps.newHashMap();
Review Comment:
why do we need 2 hashmaps? how about this
````
private static Map<String, String> getCatalogProperties(Configuration
conf, String catalogName, String catalogType) {
Map<String, String> catalogProperties = Maps.newHashMap();
Stream<String> includePrefixes = Stream.of(
InputFormatConfig.CATALOG_DEFAULT_CONFIG_PREFIX,
InputFormatConfig.CATALOG_CONFIG_PREFIX + catalogName + "."
);
conf.forEach(config ->
includePrefixes.filter(key -> config.getKey().startsWith(key))
.findAny().ifPresent(keyPrefix ->
catalogProperties.put(config.getKey().substring(keyPrefix.length()),
config.getValue())
)
);
return addCatalogPropertiesIfMissing(conf, catalogType,
catalogProperties);
}
````
--
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]